text: /*
  * @Author: @vedatbozkurt
  * @Date:   2020-05-21 03:14:20
  * @Last Modified by:   @vedatbozkurt
  * @Last Modified time: 2020-05-21 03:16:01
  */
  const { verifySignUp } = require("../middlewares");
  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/signup",
      [
        verifySignUp.checkDuplicateUsernameOrEmail,
        verifySignUp.checkRolesExisted
      ],
      controller.signup
    );
  
    app.post("/api/auth/signin", controller.signin);
  };
  