feat: refactor & redesign parts of UI

This commit is contained in:
DecDuck
2025-01-28 15:16:34 +11:00
parent 934c176974
commit cf0aa948fe
21 changed files with 639 additions and 1478 deletions

View File

@ -16,21 +16,20 @@ export default defineEventHandler(async (h3) => {
});
// Fetch specific collection
// Will not return the default collection
const collection = await userLibraryManager.fetchCollection(id);
if (!collection) {
if (!collection)
throw createError({
statusCode: 404,
statusMessage: "Collection not found",
});
}
// Verify user owns this collection
if (collection.userId !== userId) {
if (collection.userId !== userId)
throw createError({
statusCode: 403,
statusMessage: "Not authorized to access this collection",
});
}
return collection;
});