diff --git a/src/utils/index.js b/src/utils/index.js index 5aca29c..36176b1 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -1,3 +1 @@ -module.exports = { - schematized: require("./schematized"), -} \ No newline at end of file +export { default as Schematized } from "./schematized" \ No newline at end of file diff --git a/src/utils/schematized/index.js b/src/utils/schematized/index.js index dd597cc..4508906 100644 --- a/src/utils/schematized/index.js +++ b/src/utils/schematized/index.js @@ -1,4 +1,4 @@ -module.exports = (schema = {}, fn) => { +export default (schema = {}, fn) => { return async (req, res, next) => { if (typeof req.body === "undefined") { req.body = {}