@go-mailer/jarvis 3.2.2 → 3.2.4

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/query.js +3 -8
  2. package/package.json +1 -1
package/lib/query.js CHANGED
@@ -10,6 +10,7 @@ const buildQuery = (options) => {
10
10
  /** Delete sort and return fields */
11
11
  delete options.bool
12
12
  delete options.count
13
+ delete options.group_by
13
14
  delete options.page
14
15
  delete options.population
15
16
  delete options.return_only
@@ -34,7 +35,7 @@ const buildQuery = (options) => {
34
35
 
35
36
  let pipeline = []
36
37
  if (group_by) {
37
- pipeline = generatePipeline({
38
+ pipeline = generateGroupPipeline({
38
39
  group_by,
39
40
  seek_conditions,
40
41
  fields_to_return,
@@ -46,7 +47,7 @@ const buildQuery = (options) => {
46
47
 
47
48
  return {
48
49
  count,
49
- group_by,
50
+ pipeline,
50
51
  fields_to_return,
51
52
  limit,
52
53
  seek_conditions,
@@ -122,12 +123,6 @@ const buildWildcardOptions = (key_list, value) => {
122
123
  }
123
124
  }
124
125
 
125
- const cleanGroupBy = (value) => {
126
- if (!value || typeof value !== string) return null
127
-
128
- return value.split(',')[0]
129
- }
130
-
131
126
  const determinePagination = (page = 0, population = Number.MAX_SAFE_INTEGER) => {
132
127
  return {
133
128
  limit: Number(population),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-mailer/jarvis",
3
- "version": "3.2.2",
3
+ "version": "3.2.4",
4
4
  "main": "index.js",
5
5
  "repository": "git@github.com:go-mailer-ltd/jarvis-node.git",
6
6
  "author": "Nathan Oguntuberu <nateoguns.work@gmail.com>",