From 08ef996a61ec07fc870fefeaa5c90ebd36f0a75e Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Wed, 27 Mar 2024 16:21:50 +0100 Subject: [PATCH] Fixed scene actor stash query using unprivileged database connection. --- src/scenes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scenes.js b/src/scenes.js index 164b776..a00562e 100644 --- a/src/scenes.js +++ b/src/scenes.js @@ -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))