mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-07-26 01:34:38 +10:00
fix: notifications and store styling
This commit is contained in:
@@ -5,9 +5,17 @@ export default defineEventHandler(async (h3) => {
|
||||
const userId = await aclManager.getUserIdACL(h3, ["notifications:mark"]);
|
||||
if (!userId) throw createError({ statusCode: 403 });
|
||||
|
||||
const userIds = [userId];
|
||||
const hasSystemPerms = await aclManager.allowSystemACL(h3, [
|
||||
"notifications:mark",
|
||||
]);
|
||||
if(hasSystemPerms){
|
||||
userIds.push("system");
|
||||
}
|
||||
|
||||
await prisma.notification.updateMany({
|
||||
where: {
|
||||
userId,
|
||||
userId: { in: userIds },
|
||||
},
|
||||
data: {
|
||||
read: true,
|
||||
|
||||
Reference in New Issue
Block a user