первый коммит, надеюсь последний.
Сделанно: 1. минимально рабочий бэк 2. 2 модели 3. 1 миграция
This commit is contained in:
@@ -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);
|
||||
};
|
||||
Reference in New Issue
Block a user