первый коммит, надеюсь последний.

Сделанно:
1. минимально рабочий бэк
2. 2 модели
3. 1 миграция
This commit is contained in:
2023-07-09 17:35:12 +07:00
commit a059bcb196
19 changed files with 2290 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
const { verifySignUp } = require("../middleware");
const controller = require("../controllers/auth.controller");
module.exports = function(app) {
app.use(function(req, res, next) {
res.header(
"Access-Control-Allow-Headers",
"x-access-token, Origin, Content-Type, Accept"
);
next();
});
app.post(
"/api/auth/sign_up",
[
verifySignUp.checkDuplicateUsernameOrEmail,
verifySignUp.checkRolesExisted
],
controller.sign_up
);
app.post("/api/auth/sign_in", controller.sign_in);
};