Add auth debug logging
This commit is contained in:
parent
5b7efa2c18
commit
cd0fdfbd60
@ -65,8 +65,10 @@ export async function POST(request: Request) {
|
|||||||
try {
|
try {
|
||||||
const user = await getAuthenticatedUser();
|
const user = await getAuthenticatedUser();
|
||||||
if (!user) {
|
if (!user) {
|
||||||
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
|
console.error(">>> API POST: No authenticated user");
|
||||||
|
return NextResponse.json({ error: "Unauthorized - please log in again" }, { status: 401 });
|
||||||
}
|
}
|
||||||
|
console.log(">>> API POST: Authenticated as", user.email);
|
||||||
|
|
||||||
const body = await request.json();
|
const body = await request.json();
|
||||||
const { task } = body as { task?: Task };
|
const { task } = body as { task?: Task };
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user