Broken
Broken
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
No description
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
It’s weird, the api is working just fine https://app.radardrop.ai/api/__sitemap__/urls
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
Digging more tomorrow
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
// service called
public async getUrls() {
const appOrigin = this.configService.get('APP_ORIGIN');
const airdrops = await this.repo.find({ order: { temperature: 'DESC' } });

return airdrops.map((airdrop) => ({
loc: `${appOrigin}/airdrops/${airdrop.slug}`,
lastmod: airdrop.updatedAt,
}));
}
// service called
public async getUrls() {
const appOrigin = this.configService.get('APP_ORIGIN');
const airdrops = await this.repo.find({ order: { temperature: 'DESC' } });

return airdrops.map((airdrop) => ({
loc: `${appOrigin}/airdrops/${airdrop.slug}`,
lastmod: airdrop.updatedAt,
}));
}
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
// /server/api/__sitemap__/urls.ts
export default defineSitemapEventHandler(async () => {
const runtimeConfig = useRuntimeConfig();
const baseUrl = runtimeConfig.public.apiBaseURL;

return await $fetch<{ loc: string; lastmod: Date }[]>(
`${baseUrl}/v1/airdrops/sitemap/urls`,
);
});
// /server/api/__sitemap__/urls.ts
export default defineSitemapEventHandler(async () => {
const runtimeConfig = useRuntimeConfig();
const baseUrl = runtimeConfig.public.apiBaseURL;

return await $fetch<{ loc: string; lastmod: Date }[]>(
`${baseUrl}/v1/airdrops/sitemap/urls`,
);
});
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
Thank you for your help @Joshua
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
Will dig more tomorrow
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
No description
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
yep me too
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
Before I also had a wrapper but the route wasn't __sitemap__/urls
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
ok nice trying in production
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
No description
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
Trying it
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
Nice! Thank you @Joshua
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
Facing the same issue rn
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
Hey! Have you found a workaround?
61 replies