Test to access student DB in other apps (working)

This commit is contained in:
Clayzxr
2025-01-22 11:35:47 +01:00
parent d767cb0898
commit 36c5c9cf39
6 changed files with 134 additions and 6 deletions
+5 -5
View File
@@ -2,12 +2,12 @@ import {
getPartialsConfig,
makePartials,
} from "$root/defaults/makePartials.tsx";
import { EmptyObject } from "$root/defaults/interfaces.ts";
import { FreshContext } from "$fresh/server.ts";
import { State } from "$root/routes/_middleware.ts";
type MobilityIndexProps = EmptyObject;
export function Index(_props: MobilityIndexProps) {
return <p>Nothing to see here...</p>;
// deno-lint-ignore require-await
export async function Index(_request: Request, context: FreshContext<State>) {
return <h2>Welcome to {context.state.session?.displayName}.</h2>;
}
export const config = getPartialsConfig();