Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
infomiho committed Nov 22, 2024
1 parent ef74f89 commit ccb56b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion waspc/headless-test/examples/todoApp/src/server/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ export const toggleAllTasks: ToggleAllTasks = async (_args, context) => {
throw new HttpError(401)
}

const userId = context.user.id
const whereIsDone = (isDone: boolean) => ({
isDone,
user: { id: context.user!.id },
user: { id: userId },
})
const Task = context.entities.Task
const notDoneTasksCount = await Task.count({ where: whereIsDone(false) })
Expand Down

0 comments on commit ccb56b8

Please sign in to comment.