refactor: migrate authentication system and update Drizzle schema.

This commit is contained in:
2025-11-29 02:26:26 -05:00
parent c88e5d9d82
commit 3ebec7aa4a
36 changed files with 603 additions and 440 deletions
+4 -2
View File
@@ -11,7 +11,7 @@ import { initTRPC, TRPCError } from "@trpc/server";
import superjson from "superjson";
import { ZodError } from "zod";
import { auth } from "~/server/auth";
import { auth } from "~/lib/auth";
import { db } from "~/server/db";
/**
@@ -27,7 +27,9 @@ import { db } from "~/server/db";
* @see https://trpc.io/docs/server/context
*/
export const createTRPCContext = async (opts: { headers: Headers }) => {
const session = await auth();
const session = await auth.api.getSession({
headers: opts.headers,
});
return {
db,