fix: task api and other small issues

This commit is contained in:
DecDuck
2025-04-20 23:34:22 +10:00
parent feedcfc5c4
commit 31ad8505b7
4 changed files with 19 additions and 9 deletions

View File

@@ -57,8 +57,15 @@ class NotificationSystem {
}
async push(userId: string, notificationCreateArgs: NotificationCreateArgs) {
const notification = await prisma.notification.create({
data: {
const notification = await prisma.notification.upsert({
where: {
nonce: notificationCreateArgs.nonce!!
},
update: {
userId: userId,
...notificationCreateArgs,
},
create: {
userId: userId,
...notificationCreateArgs,
},