chore(website): switch to revalidate on fetch level

This commit is contained in:
iCrawl
2023-04-10 12:51:13 +02:00
parent 3ea4d26ee9
commit 0019700869
5 changed files with 5 additions and 10 deletions

View File

@@ -3,7 +3,7 @@ import { NextResponse, type NextRequest } from 'next/server';
import { PACKAGES } from './util/constants';
async function fetchLatestVersion(packageName: string) {
const res = await fetch(`https://docs.discordjs.dev/api/info?package=${packageName}`);
const res = await fetch(`https://docs.discordjs.dev/api/info?package=${packageName}`, { cache: 'no-store' });
const data: string[] = await res.json();
return data.at(-2);