From 69d8602b125cbfbc3f5bfb5ff037905a28c83033 Mon Sep 17 00:00:00 2001 From: Zakaria Mansouri Date: Sat, 28 Sep 2024 23:42:48 +0200 Subject: [PATCH] Fix regex pattern for extracting project ID from URL --- web/cloudflare/functions/projects/[slug].ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/cloudflare/functions/projects/[slug].ts b/web/cloudflare/functions/projects/[slug].ts index 16213285d..043670ccc 100644 --- a/web/cloudflare/functions/projects/[slug].ts +++ b/web/cloudflare/functions/projects/[slug].ts @@ -25,7 +25,7 @@ export const onRequest: PagesFunction = async (context) => { const pathName = new URL(context.request.url).pathname; - const projectIdRegex = /projects\/(.*)-(.\d)+/; + const projectIdRegex = /projects\/(.*)-(.\d+)/; const projectId = pathName?.match(projectIdRegex)?.[2]; if (!projectId)