MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / get

Function get

pages/index.ts:5–15  ·  view source on GitHub ↗
({ user }: RequestHandlerParams)

Source from the content-addressed store, hash-verified

3import { AppConfig } from '/lib/config.ts';
4
5async function get({ user }: RequestHandlerParams) {
6 const config = await AppConfig.getConfig();
7
8 if (user) {
9 const firstEnabledApp = config.core.enabledApps[0];
10
11 return new Response('Redirect', { status: 303, headers: { 'Location': `/${firstEnabledApp}` } });
12 }
13
14 return new Response('Redirect', { status: 303, headers: { 'Location': '/login' } });
15}
16
17export default page({
18 get,

Callers

nothing calls this directly

Calls 1

getConfigMethod · 0.80

Tested by

no test coverage detected