There was an error while loading. Please reload this page.
1 parent 6d4b56d commit 3401415Copy full SHA for 3401415
src/app/api/user/[id]/route.ts
@@ -1,4 +1,4 @@
1
-import { currentUser } from "@clerk/nextjs/server";
+import { clerkClient } from "@clerk/nextjs/server";
2
import { NextResponse } from "next/server";
3
4
export async function GET(
@@ -7,7 +7,7 @@ export async function GET(
7
) {
8
const id = params.id;
9
if (id) {
10
- const user = await currentUser();
+ const user = await (await clerkClient()).users.getUser(id);
11
if (user) {
12
return NextResponse.json({
13
id,
0 commit comments