Skip to content

Commit 13cd63c

Browse files
committed
fix (auth): user data
1 parent 5f7a223 commit 13cd63c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/client/app/api/user/data/route.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export const GET = withAuth(async function GET(request, { authHeader }) {
1515
cache: "no-store" // Prevent Next.js from caching this server-side fetch
1616
})
1717

18+
const data = await response.json()
1819
if (!response.ok) {
19-
const data = await response.json()
2020
throw new Error(
2121
data.message || "Failed to fetch user data from backend"
2222
)
@@ -32,4 +32,4 @@ export const GET = withAuth(async function GET(request, { authHeader }) {
3232
{ status: 500 }
3333
)
3434
}
35-
})
35+
})

0 commit comments

Comments
 (0)