Added secondary stash button, centralized bookmark (heart) component.

This commit is contained in:
2024-03-27 02:28:21 +01:00
parent c018f54a12
commit b1e336381c
15 changed files with 426 additions and 552 deletions

View File

@@ -51,13 +51,14 @@ export async function fetchUser(userId, options = {}, reqUser) {
}
const stashes = await knex('stashes')
.select('stashes.*', 'stashes_meta.*')
.leftJoin('stashes_meta', 'stashes_meta.stash_id', 'stashes.id')
.where('user_id', user.id)
.modify((builder) => {
if (reqUser?.id !== user.id && !options.includeStashes) {
builder.where('public', true);
}
})
.leftJoin('stashes_meta', 'stashes_meta.stash_id', 'stashes.id');
});
if (options.raw) {
return { user, stashes };