mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-22 12:41:10 +10:00
feat: refactor & redesign parts of UI
This commit is contained in:
@ -20,22 +20,6 @@ export default defineEventHandler(async (h3) => {
|
||||
if (!gameId)
|
||||
throw createError({ statusCode: 400, statusMessage: "Game ID required" });
|
||||
|
||||
// Verify collection exists and user owns it
|
||||
const collection = await userLibraryManager.fetchCollection(id);
|
||||
if (!collection) {
|
||||
throw createError({
|
||||
statusCode: 404,
|
||||
statusMessage: "Collection not found",
|
||||
});
|
||||
}
|
||||
|
||||
if (collection.userId !== userId) {
|
||||
throw createError({
|
||||
statusCode: 403,
|
||||
statusMessage: "Not authorized to modify this collection",
|
||||
});
|
||||
}
|
||||
|
||||
await userLibraryManager.collectionAdd(gameId, id);
|
||||
return { success: true };
|
||||
await userLibraryManager.collectionAdd(gameId, id, userId);
|
||||
return;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user