chore: add otp based login

This commit is contained in:
mahyargdz
2024-11-18 09:16:17 +03:30
parent 245051024b
commit d887cf67c1
16 changed files with 1266 additions and 713 deletions
+12
View File
@@ -0,0 +1,12 @@
exports.paginationOptions = ({ page, limit, sort }) => {
const parsedPage = parseInt(page, 10) || 1;
const parsedLimit = parseInt(limit, 10) || 10;
const parsedSort = sort === "asc" ? "asc" : "desc";
return {
page: parsedPage,
limit: parsedLimit,
sort: parsedSort,
skip: (parsedPage - 1) * parsedLimit,
};
};