Skip to content

Commit

Permalink
chore: fix task resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Sep 18, 2024
1 parent 3b5e2b4 commit 3a01de3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/api/src/resources/task/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,14 +324,14 @@ export const addTask: ResolverFn = async (
export const deleteTask: ResolverFn = async (
root,
{ input: { id } },
{ sqlClientPool, hasPermission, userActivityLogger }
{ sqlClientPool, hasPermission, userActivityLogger, adminScopes }
) => {
const rows = await query(sqlClientPool, Sql.selectPermsForTask(id));
await hasPermission('task', 'delete', {
project: R.path(['0', 'pid'], rows)
});

const task = await Helpers(sqlClientPool, hasPermission).getTaskByTaskInput({id: id})
const task = await Helpers(sqlClientPool, hasPermission, adminScopes).getTaskByTaskInput({id: id})

if (!task) {
throw new Error(
Expand Down

0 comments on commit 3a01de3

Please sign in to comment.