Merged in fix/include-service-token-in-debug-data (pull request #2903)
fix: include service token in the debug route * fix: include service token in the debug route Approved-by: Bianca Widstam Approved-by: Hrishikesh Vaipurkar
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { notFound } from "next/navigation"
|
||||
import { NextResponse } from "next/server"
|
||||
|
||||
import { getServiceToken } from "@scandic-hotels/common/tokenManager"
|
||||
|
||||
import { env } from "@/env/server"
|
||||
|
||||
import { auth } from "@/auth"
|
||||
@@ -11,6 +13,8 @@ export const GET = async () => {
|
||||
}
|
||||
|
||||
const user = await auth()
|
||||
const serviceToken = await getServiceToken()
|
||||
|
||||
const sortedEnv = Object.keys(env)
|
||||
.sort()
|
||||
.reduce<Record<string, unknown>>((acc, key) => {
|
||||
@@ -18,5 +22,5 @@ export const GET = async () => {
|
||||
return acc
|
||||
}, {})
|
||||
|
||||
return NextResponse.json({ user, env: sortedEnv })
|
||||
return NextResponse.json({ user, serviceToken, env: sortedEnv })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user