waibu-db 2.1.1 → 2.1.2

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/lib/prep-crud.js +2 -2
  2. package/package.json +1 -1
package/lib/prep-crud.js CHANGED
@@ -1,7 +1,7 @@
1
1
  async function prepCrud ({ model, body, id, req, reply, options = {}, args }) {
2
2
  const { parseFilter } = this.app.waibu
3
3
  const { pascalCase } = this.app.lib.aneka
4
- const { cloneDeep, has, pick } = this.app.lib._
4
+ const { cloneDeep, has } = this.app.lib._
5
5
  const cfgWeb = this.app.waibu.getConfig()
6
6
  const opts = cloneDeep(options)
7
7
  const params = this.getParams(req, ...args)
@@ -25,7 +25,7 @@ async function prepCrud ({ model, body, id, req, reply, options = {}, args }) {
25
25
 
26
26
  opts.bboxLatField = req.query[cfgWeb.qsKey.bboxLatField]
27
27
  opts.bboxLngField = req.query[cfgWeb.qsKey.bboxLngField]
28
- const filter = pick(parseFilter(req), ['query', 'match', 'limit', 'sort', 'page', 'skip'])
28
+ const filter = parseFilter(req)
29
29
  if (options.query) filter.query = cloneDeep(options.query)
30
30
  if (options.limit) filter.limit = options.limit
31
31
  if (options.sort) filter.sort = options.sort
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-db",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "DB Helper",
5
5
  "main": "index.js",
6
6
  "scripts": {