Fixed scene actor stash query using unprivileged database connection.
This commit is contained in:
parent
ab9dbb63b3
commit
08ef996a61
|
@ -166,7 +166,7 @@ export async function fetchScenesById(sceneIds, { reqUser, ...context } = {}) {
|
||||||
});
|
});
|
||||||
|
|
||||||
const actorStashes = reqUser && context.actorStashes
|
const actorStashes = reqUser && context.actorStashes
|
||||||
? await knex('stashes_actors')
|
? await knexOwner('stashes_actors')
|
||||||
.leftJoin('stashes', 'stashes.id', 'stashes_actors.stash_id')
|
.leftJoin('stashes', 'stashes.id', 'stashes_actors.stash_id')
|
||||||
.where('stashes.user_id', reqUser.id)
|
.where('stashes.user_id', reqUser.id)
|
||||||
.whereIn('stashes_actors.actor_id', actors.map((actor) => actor.id))
|
.whereIn('stashes_actors.actor_id', actors.map((actor) => actor.id))
|
||||||
|
|
Loading…
Reference in New Issue