From 3c22648eb3b44f709b404613d69e79f1c9a9b3ce Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Thu, 10 Aug 2023 13:44:25 +0100 Subject: [PATCH] fix login api for status page --- Identity/API/StatusPageAuthentication.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Identity/API/StatusPageAuthentication.ts b/Identity/API/StatusPageAuthentication.ts index 4ad71d3305..d6cda47868 100644 --- a/Identity/API/StatusPageAuthentication.ts +++ b/Identity/API/StatusPageAuthentication.ts @@ -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.'