feat(products): add debug logging for auth headers in POST request
This commit is contained in:
@@ -18,6 +18,9 @@ export async function GET(req: NextRequest) {
|
|||||||
export async function POST(req: NextRequest) {
|
export async function POST(req: NextRequest) {
|
||||||
const body = await req.json();
|
const body = await req.json();
|
||||||
const authHeaders = await getAuthHeaders();
|
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`, {
|
const res = await fetch(`${API_BASE}/api/products`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json', ...authHeaders },
|
headers: { 'Content-Type': 'application/json', ...authHeaders },
|
||||||
|
|||||||
Reference in New Issue
Block a user