From a39aef0c8cf3e2243e8d375fe5207c0dbcee06b8 Mon Sep 17 00:00:00 2001 From: Alireza Hassani Date: Sat, 22 Aug 2026 19:33:16 +0330 Subject: [PATCH] Fix sitemap sync sending JWT by enabling auth on the API request. Co-authored-by: Cursor --- apps/business/src/services/websiteSitemapService.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/business/src/services/websiteSitemapService.ts b/apps/business/src/services/websiteSitemapService.ts index be1cbab..ca63836 100644 --- a/apps/business/src/services/websiteSitemapService.ts +++ b/apps/business/src/services/websiteSitemapService.ts @@ -14,6 +14,9 @@ export interface WebsiteSitemapConfig { function businessPath(suffix: string) { const businessId = getActiveBusinessId() + if (!businessId) { + throw new Error('No active business selected. Please sign in again.') + } return `/businesses/${businessId}/website/sitemap${suffix}` } @@ -23,5 +26,6 @@ export async function syncWebsiteSitemapConfig() { sitemapConfig: WebsiteSitemapConfig }>(businessPath('/sync'), { method: 'POST', + auth: true, }) }