mirror of
https://github.com/revanced/revanced-website.git
synced 2025-06-12 21:27:42 +02:00
feat: switch api url and bypass cache while prerendering
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
import type { Repository } from 'src/data/types';
|
||||
|
||||
import { api_url } from '$lib/utils';
|
||||
|
||||
export type ContribData = { repositories: Repository[] };
|
||||
|
||||
export const prerender = true;
|
||||
@ -7,7 +9,7 @@ export const prerender = true;
|
||||
export async function load({
|
||||
fetch
|
||||
}): Promise<ContribData> {
|
||||
const response = await fetch('https://releases.rvcd.win/contributors');
|
||||
const response = await fetch(api_url('contributors'));
|
||||
const data = await response.json();
|
||||
return data;
|
||||
};
|
||||
|
@ -1,12 +1,15 @@
|
||||
import { readable } from 'svelte/store';
|
||||
import type { Patch } from 'src/data/types';
|
||||
|
||||
import { api_url } from '$lib/utils';
|
||||
|
||||
import { readable } from 'svelte/store';
|
||||
|
||||
export type PatchesData = { patches: Patch[]; packages: string[] };
|
||||
|
||||
export async function load({
|
||||
fetch
|
||||
}): Promise<PatchesData> {
|
||||
const response = await fetch('https://releases.rvcd.win/patches');
|
||||
const response = await fetch(api_url('patches'));
|
||||
const patches = await response.json();
|
||||
let packages: string[] = [];
|
||||
|
||||
|
Reference in New Issue
Block a user