text: const { reduceErrorsJoi } = require("../../utils/error");
  const { passwordValidation } = require("../../validators/authenticationValidator");
  
  module.exports.validatePassword = (req, res, next) => {
    const { value, error } = passwordValidation.validate(req.body);
    if (error) {
      return res.status(400).json({ success: false, payload: reduceErrorsJoi(error.details) });
    }
    req.value = value;
    next();
  };
  