import type { RequestHandler } from './$types'; const siteUrl = 'https://www.goodwalk.co.nz'; const routes = [ '/', '/pack-walks', '/dog-walking', '/puppy-visits', '/our-pricing', '/about', '/contact-us', '/terms-and-conditions', '/privacy-policy' ]; export const GET: RequestHandler = () => { const lastmod = new Date().toISOString().split('T')[0]; const body = ` ${routes .map( (path) => ` ${siteUrl}${path} ${lastmod} ${path === '/' ? 'weekly' : 'monthly'} ${path === '/' ? '1.0' : '0.8'} ` ) .join('\n')} `; return new Response(body, { headers: { 'Content-Type': 'application/xml; charset=utf-8' } }); };