fix: ta bort NextRequest-typning i profile/route.ts withAuth handler

This commit is contained in:
Nils-Johan Gynther
2026-04-19 21:14:41 +02:00
parent 0946617edb
commit 487cbea443
+2 -2
View File
@@ -1,4 +1,4 @@
import { NextRequest, NextResponse } from 'next/server'; import { NextResponse } from 'next/server';
import { withAuth } from '../../../lib/with-auth'; import { withAuth } from '../../../lib/with-auth';
const API_BASE = process.env.NEXT_PUBLIC_API_URL_INTERNAL || 'http://recipe-api:8080'; const API_BASE = process.env.NEXT_PUBLIC_API_URL_INTERNAL || 'http://recipe-api:8080';
@@ -12,7 +12,7 @@ export const GET = withAuth(async (_req, session) => {
return new NextResponse(text, { status: res.status, headers: { 'Content-Type': 'application/json' } }); return new NextResponse(text, { status: res.status, headers: { 'Content-Type': 'application/json' } });
}); });
export const PATCH = withAuth(async (request: NextRequest, session) => { export const PATCH = withAuth(async (request, session) => {
const body = await request.json(); const body = await request.json();
const res = await fetch(`${API_BASE}/api/users/me`, { const res = await fetch(`${API_BASE}/api/users/me`, {
method: 'PATCH', method: 'PATCH',