The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
added user object to /api/me
Steven Tey5c6dde4e624b
diff --git a/apps/web/app/api/me/route.ts b/apps/web/app/api/me/route.tsindex 42c9c9f0aa..c673e8df8c 100644--- a/apps/web/app/api/me/route.ts+++ b/apps/web/app/api/me/route.ts@@ -1,7 +1,13 @@import { withAuth } from "@/lib/auth";+import prisma from "@/lib/prisma";import { NextResponse } from "next/server";// GET /api/me - get the current userexport const GET = withAuth(async ({ session }) => {- return NextResponse.json(session.user);+ const user = await prisma.user.findUnique({+ where: {+ id: session.user.id,+ },+ });+ return NextResponse.json(user);});