login and register logic
This commit is contained in:
parent
a2f8452eec
commit
8d0c02e27e
15 changed files with 496 additions and 106 deletions
8
lib.js
8
lib.js
|
@ -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 };
|
Loading…
Add table
Add a link
Reference in a new issue