squash: AdenMGB collection design & backend work

Update index.post.ts to implement saving collections functionality

Update index.get.ts to verify if collection exists and if user can access it

Update index.delete.ts to ask questions and not be so nonchalant

Update entry.post.ts

Update entry.delete.ts to do it better

Update index.vue to add functionality to the add to library button + fidgit with image

Update index.vue to also add add to library functionality, but no fidget :(

Update entry.post.ts to infact not remove it

Update index.ts

Update index.vue to manage collections from store page

Update index.ts to restrut for ahhhh

Update index.vue too add collection control to carosel

Update index.vue fix minor issue

Update index.vue to fix dropdown modal bug

Create library.vue for page layout

Create index.vue for library game details pane

Create index.vue for viewing collections pane

Create DeleteCollectionModal.vue component

Create CreateCollectionModal.vue component

Update AddLibraryButton.vue with dropdown :D

Update index.vue to use new components

Update index.vue for more components :O

Update entry.post.ts to not not return success, it'll figure it out

Update entry.delete.ts to not return...
This commit is contained in:
Aden Lindsay
2025-01-27 11:15:09 +10:30
committed by DecDuck
parent f74b0a279e
commit 83ffb7f34f
16 changed files with 1844 additions and 97 deletions
+7 -1
View File
@@ -64,7 +64,13 @@ class UserLibraryManager {
async fetchCollections(userId: string) {
await this.fetchUserLibrary(userId); // Ensures user library exists, doesn't have much performance impact due to caching
return await prisma.collection.findMany({ where: { userId } });
return await prisma.collection.findMany({
where: { userId },
include: {
entries: true,
_count: { select: { entries: true } }
}
});
}
async collectionAdd(gameId: string, collectionId: string) {