const { splitSite } = require("../middlewares");
const db = require("../models");
const User = db.user;
// Create and Save a new User
exports.createUser = (req, res) => {
  
};
// Retrieve all Users from the database.
exports.getAllUsers = (req, res) => {
  var condition = {};
  condition = splitSite.splitSiteGet(req, condition);
  User.find(condition)
    .then(data => {
      res.send(data);
    })
    .catch(err => {
      res.status(500).send({
        message:
          err.message || "Some error occurred while retrieving users."
      });
    });
};
// Update a User by the id in the request
exports.updateUser = (req, res) => {
  
};
// Delete a User with the specified id in the request
exports.delete = (req, res) => {
  
};
