From 0c70b18e72784918ed8f88160be6ea540494d01c Mon Sep 17 00:00:00 2001 From: matevz Date: Wed, 26 Feb 2025 16:00:51 +0100 Subject: [PATCH 1/2] #BugFix - Edited the deck regex to work as currentbast does. --- src/app/api/swudbdeck/route.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/api/swudbdeck/route.ts b/src/app/api/swudbdeck/route.ts index 14e31117..92f37f71 100644 --- a/src/app/api/swudbdeck/route.ts +++ b/src/app/api/swudbdeck/route.ts @@ -38,7 +38,8 @@ export async function GET(req: Request) { } } else if (deckLink.includes('swudb.com')) { - const match = deckLink.match(/\/deck\/(?:view\/)?([^/?]+)/); + // const match = deckLink.match(/\/deck\/(?:view\/)?([^/?]+)/); + const match = deckLink.match(/\/([^\/]+)\/?$/); const deckId = match ? match[1] : null; if(deckId != null) deckIdentifier = deckId; deckSource = DeckSource.SWUDB; From a029f538d0f3fa3bbdf2f5b8acd47d0fd9531654 Mon Sep 17 00:00:00 2001 From: matevz Date: Wed, 26 Feb 2025 17:17:26 +0100 Subject: [PATCH 2/2] resolved the comment. --- src/app/api/swudbdeck/route.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/api/swudbdeck/route.ts b/src/app/api/swudbdeck/route.ts index 92f37f71..5936c819 100644 --- a/src/app/api/swudbdeck/route.ts +++ b/src/app/api/swudbdeck/route.ts @@ -38,7 +38,6 @@ export async function GET(req: Request) { } } else if (deckLink.includes('swudb.com')) { - // const match = deckLink.match(/\/deck\/(?:view\/)?([^/?]+)/); const match = deckLink.match(/\/([^\/]+)\/?$/); const deckId = match ? match[1] : null; if(deckId != null) deckIdentifier = deckId;