Skip to content

Commit

Permalink
fix: build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-rw committed Sep 25, 2024
1 parent 2bbc98b commit 2f0ab46
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/nextjs/src/app/api/[...trpc]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const handlerAsync = async (req: Request) => {
let session: Session | null;

logger.info(
"Creating OpenAPI fetch handler for user " + (apiKeyHeaderValue ? "with an api key" : "without an api key"),
`Creating OpenAPI fetch handler for user ${apiKeyHeaderValue ? "with an api key" : "without an api key"}`,
);

if (apiKeyHeaderValue !== null) {
Expand Down Expand Up @@ -46,7 +46,7 @@ const handlerAsync = async (req: Request) => {
req,
endpoint: "/",
router: appRouter,
createContext: () => createTRPCContext({ session: session, headers: req.headers }),
createContext: () => createTRPCContext({ session, headers: req.headers }),
});
};

Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/router/apiKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const apiKeysRouter = createTRPCRouter({
await db.insert(apiKeys).values({
id: createId(),
apiKey: hashedRandomToken,
salt: salt,
salt,
userId: ctx.session.user.id,
});
return {
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/callbacks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const createSessionAsync = async (
permissions: await getCurrentUserPermissionsAsync(db, user.id),
colorScheme: "auto",
},
} satisfies Session;
} as Session;
};

export const createSessionCallback = (db: Database): NextAuthCallbackOf<"session"> => {
Expand Down

0 comments on commit 2f0ab46

Please sign in to comment.