const express = require("express"),
  router = express.Router(),
  { _create } = require("../controller/users");

router.post("/signup", async (req, res) => {
  try {
    const user = await _create(req.body);
    res.status(201).send(user);
  } catch (error) {
    res.status(400).send(error.message);
  }
});

module.exports = router;
