/* eslint-disable import/no-anonymous-default-export */ import type { Context } from "@netlify/functions" export default async (request: Request, context: Context) => { const { next_run } = await request.json() const SITEMAP_SYNC_SECRET = Netlify.env.get("SITEMAP_SYNC_SECRET") const PUBLIC_URL = Netlify.env.get("PUBLIC_URL") console.info( `Started sitemap sync at: ${new Date().toISOString()}! Next invocation at: ${next_run}` ) const headers = new Headers() headers.set("x-sitemap-sync-secret", SITEMAP_SYNC_SECRET!) fetch(`${PUBLIC_URL}/api/sitemap`, { headers, }) }