import type { PageLoad } from './$types';
import { error } from '@sveltejs/kit';
import { server } from '../../../../helpers';
export const load: PageLoad = async ({ fetch, params }) => {
const resp = await fetch(`${server}/api/change/${params.user}/${params.repo}/get/${params.hash}`);
if (resp.status == 200) {
const x = await resp.json();
console.log(JSON.stringify(x));
return x;
} else {
throw error(resp.status);
}
};