wip: trpc

This commit is contained in:
Andras Bacsai
2022-12-21 13:06:44 +01:00
parent 4fa0f2d04a
commit 9c6f412f04
26 changed files with 3383 additions and 39 deletions

View File

@@ -16,7 +16,7 @@ export function createContext({ req }: CreateFastifyContextOptions) {
if (token) {
user = jwt.verify(token, env.COOLIFY_SECRET_KEY) as User;
}
return { user };
return { user, hostname: req.hostname };
}
export type Context = inferAsyncReturnType<typeof createContext>;