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

@ -13,18 +13,7 @@ export default defineEventHandler(async (h3) => {
if (!gameId)
throw createError({ statusCode: 400, statusMessage: "Game ID required" });
// Get the default collection for this user
const collections = await userLibraryManager.fetchCollections(userId);
const defaultCollection = collections.find(c => c.isDefault);
if (!defaultCollection) {
throw createError({
statusCode: 404,
statusMessage: "Default collection not found",
});
}
// Add the game to the default collection
await userLibraryManager.collectionAdd(gameId, defaultCollection.id);
await userLibraryManager.libraryAdd(gameId, userId);
return {};
});