feat: add homepage & auth

This commit is contained in:
2024-02-23 19:36:10 +07:00
parent d579c1b7c5
commit 735fa9354b
42 changed files with 981 additions and 70 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
import { Request } from "express";
import { CreateExpressContextOptions } from "@trpc/server/adapters/express";
export const createContext = async ({ req }: { req: Request }) => {
return {};
export const createContext = async (ctx: CreateExpressContextOptions) => {
return ctx;
};
export type Context = Awaited<ReturnType<typeof createContext>>;
+1 -1
View File
@@ -5,7 +5,7 @@ import { PageContext } from "vike/types";
const trpcServer = async (ctx: PageContext) => {
const createCaller = createCallerFactory(appRouter);
const context = await createContext({ req: ctx.req });
const context = await createContext(ctx);
return createCaller(context);
};