From d9edc5efd321284b5e7053fcbb9f705e1465c42b Mon Sep 17 00:00:00 2001 From: ali ebrahimi Date: Thu, 27 Jun 2024 06:05:35 +0330 Subject: [PATCH] Fix lint errors --- src/repositories/multisigSessionRepository.ts | 5 ++++- src/routes/v1/multisigSessionCountRouter.ts | 9 +++++++-- src/utils/errorMessages.ts | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/repositories/multisigSessionRepository.ts b/src/repositories/multisigSessionRepository.ts index 9bb4ae6..4cc44e5 100644 --- a/src/repositories/multisigSessionRepository.ts +++ b/src/repositories/multisigSessionRepository.ts @@ -49,7 +49,10 @@ export const findNonExpiredMultisigSessions = async ( return session; }; -export async function getMultisigSessionsCount(fromDate: Date, toDate: Date): Promise { +export async function getMultisigSessionsCount( + fromDate: Date, + toDate: Date, +): Promise { return await MultisigSession.count({ where: { createdAt: Between(fromDate, toDate), diff --git a/src/routes/v1/multisigSessionCountRouter.ts b/src/routes/v1/multisigSessionCountRouter.ts index c29bf16..148bea7 100644 --- a/src/routes/v1/multisigSessionCountRouter.ts +++ b/src/routes/v1/multisigSessionCountRouter.ts @@ -10,11 +10,16 @@ multisigSessionCountRouter.get( try { const { from, to } = req.query; if (!from || !to) { - res.status(422).json({ message: errorMessagesEnum.MULTISIG_SESSION_COUNTS_INVALID_REQUEST }); + res.status(422).json({ + message: errorMessagesEnum.MULTISIG_SESSION_COUNTS_INVALID_REQUEST, + }); return; } - const count = await getMultisigSessionsCount(new Date(String(from)), new Date(String(to))); + const count = await getMultisigSessionsCount( + new Date(String(from)), + new Date(String(to)), + ); res.send({ count, diff --git a/src/utils/errorMessages.ts b/src/utils/errorMessages.ts index 2a84d6b..66f08ae 100644 --- a/src/utils/errorMessages.ts +++ b/src/utils/errorMessages.ts @@ -141,5 +141,5 @@ export const errorMessagesEnum = { message: 'Multisig session counts invalid request, params not found', httpStatusCode: 404, code: 2009, - } + }, };