From f9e81eb4e4c4b8cfef2eb2d862f0073583ab1ea4 Mon Sep 17 00:00:00 2001 From: James Burke Date: Thu, 8 Aug 2024 19:22:57 -0400 Subject: [PATCH] Debugging the slack integration (#4) * Add new endpoints and improve tests * remove char * Fixes * fix name * Debugging * okay this should work --- app/api/v1/slack/notification-for-capture/route.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/v1/slack/notification-for-capture/route.js b/app/api/v1/slack/notification-for-capture/route.js index 504e1ea..77d1771 100644 --- a/app/api/v1/slack/notification-for-capture/route.js +++ b/app/api/v1/slack/notification-for-capture/route.js @@ -17,8 +17,8 @@ export const dynamic = 'force-dynamic'; */ export async function POST(request) { try { - const prefix = request.nextUrl.searchParams.get('prefix'); - const link = `https://pmc-wayback-machine.vercel.app/#${prefix}`; + const { prefix = '' } = await request.json(); + const link = `https://${process.env.NEXT_PUBLIC_URL}/#${prefix}`; const message = `<${link}|New Screenshots!>`; const success = await slackWebApi.chat.postMessage({