The weeb for the next gen discord boat - Wamellow wamellow.com
bot discord
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

add ai gallery to sitemap

Luna 639f7d2b 1d797d0c

+6 -2
+6 -2
app/sitemap.xml/route.ts
··· 8 8 // Update sitemap only one a day 9 9 export const revalidate = 1000 * 60 * 60 * 24; 10 10 11 + const fetchOptions = { headers: { Authorization: process.env.API_SECRET as string }, next: { revalidate: 60 * 12 } }; 12 + 11 13 export async function GET() { 12 - const guildIds = await fetch(`${process.env.NEXT_PUBLIC_API}/guilds`, { headers: { Authorization: process.env.API_SECRET as string }, next: { revalidate: 60 * 12 } }).then((res) => res.json()) as string[]; 14 + const uploadIds = await fetch(`${process.env.NEXT_PUBLIC_API}/ai/sitemap`, fetchOptions).then((res) => res.json()) as string[]; 15 + const guildIds = await fetch(`${process.env.NEXT_PUBLIC_API}/guilds`, fetchOptions).then((res) => res.json()) as string[]; 13 16 14 17 const sitemap = [ 15 18 { ··· 62 65 } 63 66 ] as Sitemap; 64 67 65 - for (const guildId of guildIds) sitemap.push({ url: getCanonicalUrl("leaderboard", guildId), priority: 0.6 }); 68 + for (const uploadId of uploadIds) sitemap.push({ url: getCanonicalUrl("ai-gallery", uploadId), priority: 0.6 }); 69 + for (const guildId of guildIds) sitemap.push({ url: getCanonicalUrl("leaderboard", guildId), priority: 0.5 }); 66 70 67 71 return new Response(` 68 72 <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">