login and register logic

This commit is contained in:
biglyderv 2025-02-25 19:47:28 -05:00
parent a2f8452eec
commit 8d0c02e27e
Signed by: biglyderv
GPG key ID: 0E2EB0B4CD7397B5
15 changed files with 496 additions and 106 deletions

8
lib.js
View file

@ -1,8 +1,12 @@
async function importRouters(app, routers) {
for (let router in routers) {
console.log(router)
await app.use(router, (await import(routers[router])).default)
}
}
export { importRouters };
function apiStat(res, next, message, success = false, redirect = '/') {
res.api = { success, message, redirect };
next();
}
export { importRouters, apiStat };