Fix sitemap sync sending JWT by enabling auth on the API request.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
5926f772e2
commit
a39aef0c8c
@@ -14,6 +14,9 @@ export interface WebsiteSitemapConfig {
|
|||||||
|
|
||||||
function businessPath(suffix: string) {
|
function businessPath(suffix: string) {
|
||||||
const businessId = getActiveBusinessId()
|
const businessId = getActiveBusinessId()
|
||||||
|
if (!businessId) {
|
||||||
|
throw new Error('No active business selected. Please sign in again.')
|
||||||
|
}
|
||||||
return `/businesses/${businessId}/website/sitemap${suffix}`
|
return `/businesses/${businessId}/website/sitemap${suffix}`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,5 +26,6 @@ export async function syncWebsiteSitemapConfig() {
|
|||||||
sitemapConfig: WebsiteSitemapConfig
|
sitemapConfig: WebsiteSitemapConfig
|
||||||
}>(businessPath('/sync'), {
|
}>(businessPath('/sync'), {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
auth: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user