fix: sitemap
This commit is contained in:
@@ -6,7 +6,7 @@ export async function GET({ fetch, setHeaders }) {
|
|||||||
const site = 'https://koreanskincareandclinic.com';
|
const site = 'https://koreanskincareandclinic.com';
|
||||||
const response = await fetch('https://api.koreanskincareandclinic.com/api/product');
|
const response = await fetch('https://api.koreanskincareandclinic.com/api/product');
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error('Failed to fetch posts.');
|
throw new Error('Failed to fetch product.');
|
||||||
}
|
}
|
||||||
const products = await response.json();
|
const products = await response.json();
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ export async function GET({ fetch, setHeaders }) {
|
|||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
<priority>0.7</priority>
|
<priority>0.7</priority>
|
||||||
</url>
|
</url>
|
||||||
${products.products
|
${products
|
||||||
.map(
|
.map(
|
||||||
(/** @type {{ id: any;slug:string; published_at: string; }} */ product) => `
|
(/** @type {{ id: any;slug:string; published_at: string; }} */ product) => `
|
||||||
<url>
|
<url>
|
||||||
|
|||||||
Reference in New Issue
Block a user