mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-16 09:41:13 +10:00
fix: notifications and store styling
This commit is contained in:
@ -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 },
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user