mongoku
Version:
[](https://github.com/huggingface/Mongoku/actions/workflows/ci.yml)
13 lines (11 loc) • 377 B
text/typescript
import { env } from "$env/dynamic/private";
import { getOAuthConfig } from "$lib/server/oauth";
import type { LayoutServerLoad } from "./$types";
export const load: LayoutServerLoad = async (event) => {
return {
readOnly: env.MONGOKU_READ_ONLY_MODE === "true",
serverOrigin: event.url.origin,
oauthEnabled: !!(await getOAuthConfig()),
user: event.locals.user,
};
};