const signUpError = require("../../../utils/customErrors/signUpError");
import {signUpSchema} from "../../../utils/schemasYup/signUpSchema";

module.exports = async (req, res, next) => {

    if( await signUpSchema.isValid(req.body) ) {
        next();
    }else {
        next(new signUpError());
    }

};