feat: partial user platform support + statusMessage -> message

This commit is contained in:
DecDuck
2025-08-27 11:25:23 +10:00
parent 3af00e085e
commit 8efddc07bc
143 changed files with 831 additions and 593 deletions

View File

@ -6,14 +6,14 @@ export default defineEventHandler(async (h3) => {
if (!userId)
throw createError({
statusCode: 403,
statusMessage: "Requires authentication",
message: "Requires authentication",
});
const id = getRouterParam(h3, "id");
if (!id)
throw createError({
statusCode: 400,
statusMessage: "ID required in route params",
message: "ID required in route params",
});
// Verify collection exists and user owns it
@ -22,13 +22,13 @@ export default defineEventHandler(async (h3) => {
if (!collection)
throw createError({
statusCode: 404,
statusMessage: "Collection not found",
message: "Collection not found",
});
if (collection.userId !== userId)
throw createError({
statusCode: 403,
statusMessage: "Not authorized to delete this collection",
message: "Not authorized to delete this collection",
});
await userLibraryManager.deleteCollection(id);