Skip to content

Commit

Permalink
Fix query logic
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbar01234 committed Apr 15, 2024
1 parent e3d1f11 commit 65f9a7e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/app/api/file/[fileId]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ export const PATCH = withSession(async ({ params, session, req }) => {

const otherFiles = await prisma.file.findMany({
where: {
AND: [
{ NOT: { id: maybeFile?.id } },
{ date: fileRequest.data.date, seniorId: fileData.seniorId },
],
date: fileData.date,
seniorId: fileData.seniorId,
id: {
not: fileId,
},
},
});

Expand Down

0 comments on commit 65f9a7e

Please sign in to comment.