Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ae2079 committed Jun 27, 2024
1 parent 804cb1e commit d9edc5e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/repositories/multisigSessionRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ export const findNonExpiredMultisigSessions = async (
return session;
};

export async function getMultisigSessionsCount(fromDate: Date, toDate: Date): Promise<number> {
export async function getMultisigSessionsCount(
fromDate: Date,
toDate: Date,
): Promise<number> {
return await MultisigSession.count({
where: {
createdAt: Between(fromDate, toDate),
Expand Down
9 changes: 7 additions & 2 deletions src/routes/v1/multisigSessionCountRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/errorMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,5 @@ export const errorMessagesEnum = {
message: 'Multisig session counts invalid request, params not found',
httpStatusCode: 404,
code: 2009,
}
},
};

0 comments on commit d9edc5e

Please sign in to comment.