mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-14 16:51:15 +10:00
feat: partial user platform support + statusMessage -> message
This commit is contained in:
@ -9,7 +9,7 @@ export default defineEventHandler(async (h3) => {
|
||||
if (!notificationId)
|
||||
throw createError({
|
||||
statusCode: 400,
|
||||
statusMessage: "Missing notification ID",
|
||||
message: "Missing notification ID",
|
||||
});
|
||||
|
||||
const userIds = [userId];
|
||||
@ -30,7 +30,7 @@ export default defineEventHandler(async (h3) => {
|
||||
if (!notification)
|
||||
throw createError({
|
||||
statusCode: 400,
|
||||
statusMessage: "Invalid notification ID",
|
||||
message: "Invalid notification ID",
|
||||
});
|
||||
|
||||
return {};
|
||||
|
||||
@ -9,7 +9,7 @@ export default defineEventHandler(async (h3) => {
|
||||
if (!notificationId)
|
||||
throw createError({
|
||||
statusCode: 400,
|
||||
statusMessage: "Missing notification ID",
|
||||
message: "Missing notification ID",
|
||||
});
|
||||
|
||||
const userIds = [userId];
|
||||
@ -30,7 +30,7 @@ export default defineEventHandler(async (h3) => {
|
||||
if (!notification)
|
||||
throw createError({
|
||||
statusCode: 400,
|
||||
statusMessage: "Invalid notification ID",
|
||||
message: "Invalid notification ID",
|
||||
});
|
||||
|
||||
return notification;
|
||||
|
||||
@ -9,7 +9,7 @@ export default defineEventHandler(async (h3) => {
|
||||
if (!notificationId)
|
||||
throw createError({
|
||||
statusCode: 400,
|
||||
statusMessage: "Missing notification ID",
|
||||
message: "Missing notification ID",
|
||||
});
|
||||
|
||||
const userIds = [userId];
|
||||
@ -33,7 +33,7 @@ export default defineEventHandler(async (h3) => {
|
||||
if (!notification)
|
||||
throw createError({
|
||||
statusCode: 400,
|
||||
statusMessage: "Invalid notification ID",
|
||||
message: "Invalid notification ID",
|
||||
});
|
||||
|
||||
return notification;
|
||||
|
||||
@ -9,7 +9,7 @@ export default defineEventHandler(async (h3) => {
|
||||
if (!acls)
|
||||
throw createError({
|
||||
statusCode: 500,
|
||||
statusMessage: "Got userId but no ACLs - what?",
|
||||
message: "Got userId but no ACLs - what?",
|
||||
});
|
||||
|
||||
const notifications = await prisma.notification.findMany({
|
||||
|
||||
@ -9,7 +9,7 @@ export default defineEventHandler(async (h3) => {
|
||||
if (!acls)
|
||||
throw createError({
|
||||
statusCode: 500,
|
||||
statusMessage: "Got userId but no ACLs - what?",
|
||||
message: "Got userId but no ACLs - what?",
|
||||
});
|
||||
|
||||
await prisma.notification.updateMany({
|
||||
|
||||
Reference in New Issue
Block a user