mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
14 lines
407 B
TypeScript
14 lines
407 B
TypeScript
import type { PageServerLoad } from './$types';
|
|
|
|
export const load: PageServerLoad = async ({ fetch, url }) => {
|
|
try {
|
|
const optionsRes = await fetch('/api/paste/info');
|
|
const authInfo = await fetch('/api/auth/info');
|
|
const options = await optionsRes.json();
|
|
const auth = await authInfo.json();
|
|
return { options, auth, url: url.href };
|
|
} catch {
|
|
return { options: null, url: url.href };
|
|
}
|
|
};
|