Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
timthedev07 committed Dec 29, 2023
1 parent ab32e02 commit f0083a1
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions app/src/server/crud/questions/deleteQuestion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ export const deleteQuestion = publicProcedure
id: quid,
questionerId: uid,
answered: false,
answers: {
some: {
AND: [{ accepted: false }, { moderated: false }],
OR: [
{
answers: {
some: {
AND: [{ accepted: false }, { moderated: false }],
},
},
},
},
{ answers: { none: {} } },
],
},
include: { attachments: { select: { objKey: true } } },
});
Expand Down

0 comments on commit f0083a1

Please sign in to comment.