@aaroncadillac/crudify-mongo 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/crudify.js +4 -4
  2. package/package.json +1 -1
package/crudify.js CHANGED
@@ -112,10 +112,10 @@ function Crudify (fastify, opts, next) {
112
112
  }
113
113
  })
114
114
 
115
- opts.additionalRoutes?.map(route => {
116
- fastify.route(route)
117
- })
118
-
115
+ if (opts.additionalRoutes) {
116
+ opts.additionalRoutes(fastify, opts)
117
+ }
118
+
119
119
  next()
120
120
  }
121
121
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aaroncadillac/crudify-mongo",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "An automatic CRUD generator for fastify",
5
5
  "main": "crudify.js",
6
6
  "repository": "git@github.com:aaroncadillac/crudify-mongo.git",