From 9442b5a53cc859a39f5ca1df07c62ed5ae88f699 Mon Sep 17 00:00:00 2001 From: DecDuck Date: Fri, 27 Feb 2026 10:06:41 +1100 Subject: [PATCH 1/3] fix: tag connect/disconnect --- server/api/v1/admin/game/[id]/tags.patch.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/server/api/v1/admin/game/[id]/tags.patch.ts b/server/api/v1/admin/game/[id]/tags.patch.ts index 83f14328..c2999cd4 100644 --- a/server/api/v1/admin/game/[id]/tags.patch.ts +++ b/server/api/v1/admin/game/[id]/tags.patch.ts @@ -16,10 +16,19 @@ export default defineEventHandler(async (h3) => { const game = await prisma.game.findUnique({ where: { id }, - select: { id: true }, + select: { id: true, tags: { select: { id: true } } }, }); if (!game) throw createError({ statusCode: 404, message: "Game not found" }); + const tagSet = new Set(game.tags.map((v) => v.id)); + const toConnect = body.tags.filter((v) => !tagSet.has(v)); + + const bodyTagSet = new Set(body.tags); + const toDisconnect = tagSet + .values() + .filter((v) => !bodyTagSet.has(v)) + .toArray(); + // SAFETY: Okay to disable due to check above // eslint-disable-next-line drop/no-prisma-delete await prisma.game.update({ @@ -28,7 +37,8 @@ export default defineEventHandler(async (h3) => { }, data: { tags: { - connect: body.tags.map((e) => ({ id: e })), + connect: toConnect.map((e) => ({ id: e })), + disconnect: toDisconnect.map((e) => ({ id: e })), }, }, }); From b05c34923868e82fb7beee7ab89079821dd24d9d Mon Sep 17 00:00:00 2001 From: DecDuck Date: Fri, 27 Feb 2026 10:08:39 +1100 Subject: [PATCH 2/3] fix: lint --- i18n/locales/en_us.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/i18n/locales/en_us.json b/i18n/locales/en_us.json index 196128ed..292affba 100644 --- a/i18n/locales/en_us.json +++ b/i18n/locales/en_us.json @@ -160,6 +160,12 @@ "add": "Add", "cannotUndo": "This action cannot be undone.", "close": "Close", + "components": { + "multiitem": { + "new": "Create new: \"{0}\"", + "placeholder": "Start typing..." + } + }, "create": "Create", "date": "Date", "delete": "Delete", @@ -181,13 +187,7 @@ "servers": "Servers", "srLoading": "Loading…", "tags": "Tags", - "today": "Today", - "components": { - "multiitem": { - "placeholder": "Start typing...", - "new": "Create new: \"{0}\"" - } - } + "today": "Today" }, "drop": { "desc": "An open-source game distribution platform built for speed, flexibility and beauty.", From a0bdaf70e371e47d5ebce3cd3fdc05794e7fea5d Mon Sep 17 00:00:00 2001 From: DecDuck Date: Fri, 27 Feb 2026 15:14:22 +1100 Subject: [PATCH 3/3] fix: oidc typo fix --- server/api/v1/auth/{odic => oidc}/callback.get.ts | 0 server/api/v1/auth/{odic => oidc}/logout.post.ts | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename server/api/v1/auth/{odic => oidc}/callback.get.ts (100%) rename server/api/v1/auth/{odic => oidc}/logout.post.ts (100%) diff --git a/server/api/v1/auth/odic/callback.get.ts b/server/api/v1/auth/oidc/callback.get.ts similarity index 100% rename from server/api/v1/auth/odic/callback.get.ts rename to server/api/v1/auth/oidc/callback.get.ts diff --git a/server/api/v1/auth/odic/logout.post.ts b/server/api/v1/auth/oidc/logout.post.ts similarity index 100% rename from server/api/v1/auth/odic/logout.post.ts rename to server/api/v1/auth/oidc/logout.post.ts