fix login api for status page

This commit is contained in:
Simon Larsen 2023-08-10 13:44:25 +01:00
parent 65720cd818
commit 3c22648eb3
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE

View File

@ -340,13 +340,17 @@ router.post(
OneUptimeDate.getSecondsInDays(new PositiveNumber(30))
);
return Response.sendJsonObjectResponse(req, res, {
token: token,
user: JSONFunctions.toJSON(
alreadySavedUser,
StatusPagePrivateUser
),
});
return Response.sendEntityResponse(
req,
res,
alreadySavedUser,
StatusPagePrivateUser,
{
miscData: {
token,
},
}
);
}
throw new BadDataException(
'Invalid login: Email or password does not match.'