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