Files
web/apps/scandic-web/app/api/debug/route.ts
Joakim Jäderberg daf765f3d5 Merged in feature/wrap-logging (pull request #2511)
Feature/wrap logging

* feat: change all logging to go through our own logger function so that we can control log levels

* move packages/trpc to using our own logger

* merge


Approved-by: Linus Flood
2025-07-03 12:37:04 +00:00

19 lines
425 B
TypeScript

import { notFound } from "next/navigation"
import { NextResponse } from "next/server"
import { logger } from "@scandic-hotels/common/logger"
import { env } from "@/env/server"
import { auth } from "@/auth"
export const GET = async () => {
if (env.NODE_ENV !== "development") {
return notFound()
}
const user = await auth()
logger.debug("[DEBUG] access-token", user?.token)
return NextResponse.json(user)
}