mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 02:53:31 +01:00
fix(website): pass on revalidate
This commit is contained in:
@@ -4,7 +4,12 @@ import { readFile } from 'node:fs/promises';
|
|||||||
import { join } from 'node:path';
|
import { join } from 'node:path';
|
||||||
import { connect } from '@planetscale/database';
|
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[]> {
|
export async function fetchVersions(packageName: string): Promise<string[]> {
|
||||||
const response = await fetch(`https://docs.discordjs.dev/api/info?package=${packageName}`, {
|
const response = await fetch(`https://docs.discordjs.dev/api/info?package=${packageName}`, {
|
||||||
|
|||||||
Reference in New Issue
Block a user