feat(products): add debug logging for auth headers in POST request

This commit is contained in:
Nils-Johan Gynther
2026-04-19 15:22:36 +02:00
parent 4e85d1309b
commit 2a7df22bd9
+3
View File
@@ -18,6 +18,9 @@ export async function GET(req: NextRequest) {
export async function POST(req: NextRequest) {
const body = await req.json();
const authHeaders = await getAuthHeaders();
// Debug: log auth headers
// eslint-disable-next-line no-console
console.log('API /api/products POST: authHeaders =', authHeaders);
const res = await fetch(`${API_BASE}/api/products`, {
method: 'POST',
headers: { 'Content-Type': 'application/json', ...authHeaders },