current-user should be null if project ID is wrong

This commit is contained in:
Stan Wohlwend 2024-04-19 19:14:50 +02:00
parent 3b9e96e460
commit a5f9587f22

View File

@ -73,7 +73,7 @@ const handler = deprecatedSmartRouteHandler(async (req: NextRequest) => {
const { userId, projectId: accessTokenProjectId } = decodedAccessToken;
if (accessTokenProjectId !== projectId) {
throw new StatusError(StatusError.Forbidden);
return NextResponse.json(null);
}
let user;