♻️ Improvements to house-keeping webhook (#1063)

This commit is contained in:
Luke Vella 2024-03-16 11:56:07 +07:00 committed by GitHub
parent 0d82c158ce
commit 90f0d90fab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 173 additions and 104 deletions

View file

@ -237,7 +237,10 @@ export const polls = router({
)
.mutation(async ({ input: { urlId } }) => {
const pollId = await getPollIdFromAdminUrlId(urlId);
await prisma.poll.delete({ where: { id: pollId } });
await prisma.poll.update({
where: { id: pollId },
data: { deleted: true, deletedAt: new Date() },
});
}),
touch: publicProcedure
.input(