fix: sitemap

This commit is contained in:
2025-09-26 08:44:40 +05:45
parent 74e1081381
commit be4db34031

View File

@@ -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>