From 1dd6271fe85eeeb76430aa2dcb51251cecac31ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matev=C5=BE=20Ogrinc?= Date: Wed, 26 Feb 2025 18:44:22 +0100 Subject: [PATCH] swudb regex link change (#131) - Edited the deck regex to work as currentbast does. --- src/app/api/swudbdeck/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/api/swudbdeck/route.ts b/src/app/api/swudbdeck/route.ts index 14e31117..5936c819 100644 --- a/src/app/api/swudbdeck/route.ts +++ b/src/app/api/swudbdeck/route.ts @@ -38,7 +38,7 @@ 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; deckSource = DeckSource.SWUDB;