Fixed scene actor stash query using unprivileged database connection.

This commit is contained in:
DebaucheryLibrarian 2024-03-27 16:21:50 +01:00
parent ab9dbb63b3
commit 08ef996a61
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ export async function fetchScenesById(sceneIds, { reqUser, ...context } = {}) {
});
const actorStashes = reqUser && context.actorStashes
? await knex('stashes_actors')
? await knexOwner('stashes_actors')
.leftJoin('stashes', 'stashes.id', 'stashes_actors.stash_id')
.where('stashes.user_id', reqUser.id)
.whereIn('stashes_actors.actor_id', actors.map((actor) => actor.id))