mirror of
https://github.com/discordjs/discord.js.git
synced 2024-08-21 00:34:49 +12:00
fix(website): pass on revalidate
This commit is contained in:
parent
d1955f7c9e
commit
7d3827ebd1
1 changed files with 6 additions and 1 deletions
|
@ -4,7 +4,12 @@ import { readFile } from 'node:fs/promises';
|
|||
import { join } from 'node:path';
|
||||
import { connect } from '@planetscale/database';
|
||||
|
||||
const sql = connect({ url: process.env.DATABASE_URL! });
|
||||
const sql = connect({
|
||||
async fetch(input, init) {
|
||||
return fetch(input, { ...init, next: { revalidate: 3_600 } });
|
||||
},
|
||||
url: process.env.DATABASE_URL!,
|
||||
});
|
||||
|
||||
export async function fetchVersions(packageName: string): Promise<string[]> {
|
||||
const response = await fetch(`https://docs.discordjs.dev/api/info?package=${packageName}`, {
|
||||
|
|
Loading…
Reference in a new issue