From 08411211ab4239e153fe2ed7864dddceb9734eff Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Wed, 27 Sep 2023 17:00:02 +0100 Subject: [PATCH] fix fmt --- Common/Types/PositiveNumber.ts | 5 ++++- Identity/API/StatusPageAuthentication.ts | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Common/Types/PositiveNumber.ts b/Common/Types/PositiveNumber.ts index c880ce053c..44243c9967 100644 --- a/Common/Types/PositiveNumber.ts +++ b/Common/Types/PositiveNumber.ts @@ -12,7 +12,10 @@ export default class PositiveNumber { public constructor(positiveNumber: number | string) { if (typeof positiveNumber === Typeof.String) { - positiveNumber = Number.parseInt(positiveNumber.toString().trim(), 10); + positiveNumber = Number.parseInt( + positiveNumber.toString().trim(), + 10 + ); if (isNaN(positiveNumber)) { throw new BadDataException(`Invalid number: ${positiveNumber}`); } diff --git a/Identity/API/StatusPageAuthentication.ts b/Identity/API/StatusPageAuthentication.ts index 6adf3ada4d..3ab72e991e 100644 --- a/Identity/API/StatusPageAuthentication.ts +++ b/Identity/API/StatusPageAuthentication.ts @@ -186,7 +186,9 @@ router.post( const alreadySavedUser: StatusPagePrivateUser | null = await StatusPagePrivateUserService.findOneBy({ query: { - statusPageId: new ObjectID(data['statusPageId'].toString()), + statusPageId: new ObjectID( + data['statusPageId'].toString() + ), resetPasswordToken: (user.resetPasswordToken as string) || '', }, @@ -340,7 +342,11 @@ router.post( const alreadySavedUser: StatusPagePrivateUser | null = await StatusPagePrivateUserService.findOneBy({ - query: { email: user.email!, password: user.password!, statusPageId: user.statusPageId! }, + query: { + email: user.email!, + password: user.password!, + statusPageId: user.statusPageId!, + }, select: { _id: true, password: true,