fix: notifications and store styling

This commit is contained in:
DecDuck
2025-03-11 17:08:31 +11:00
parent 9515a21dc6
commit 137241fdbb
15 changed files with 203 additions and 81 deletions

View File

@ -12,10 +12,18 @@ export default defineEventHandler(async (h3) => {
statusMessage: "Missing notification ID",
});
const userIds = [userId];
const hasSystemPerms = await aclManager.allowSystemACL(h3, [
"notifications:delete",
]);
if (hasSystemPerms) {
userIds.push("system");
}
const notification = await prisma.notification.delete({
where: {
id: notificationId,
userId,
userId: { in: userIds },
},
});