aloux-iam 0.0.131 → 0.0.132

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.
@@ -44,6 +44,11 @@ self.retrievePages = async (req, res) => {
44
44
  let { page = 1, itemsPerPage = 10, sort = { createdAt: -1 } } = req.body.config || {}
45
45
  let query = {}
46
46
  let attributes = { pwd: 0, tokens: 0 }
47
+ if (req.body.filter.search) {
48
+ query.$or = [
49
+ { name: { $regex: search, $options: 'i' } }
50
+ ];
51
+ }
47
52
 
48
53
  const count = await Business.countDocuments(query, attributes)
49
54
  let items
@@ -57,6 +57,13 @@ self.retrievePages = async (req, res) => {
57
57
  let query = {}
58
58
  let attributes = { pwd: 0, tokens: 0 }
59
59
 
60
+ if (req.body.filter.search) {
61
+ query.$or = [
62
+ { name: { $regex: search, $options: 'i' } },
63
+ { description: { $regex: search, $options: 'i' } }
64
+ ];
65
+ }
66
+
60
67
  const count = await Functions.countDocuments(query, attributes)
61
68
  let items
62
69
 
@@ -60,6 +60,14 @@ self.retrievePages = async (req, res) => {
60
60
  let query = {}
61
61
  let attributes = { pwd: 0, tokens: 0 }
62
62
 
63
+ if (req.body.filter.search) {
64
+ query.$or = [
65
+ { label: { $regex: search, $options: 'i' } },
66
+ { description: { $regex: search, $options: 'i' } },
67
+ { path: { $regex: search, $options: 'i' } }
68
+ ];
69
+ }
70
+
63
71
  const count = await Menu.countDocuments(query, attributes)
64
72
  let items
65
73
 
@@ -62,6 +62,15 @@ self.retrievePages = async (req, res) => {
62
62
  let query = {}
63
63
  let attributes = { pwd: 0, tokens: 0 }
64
64
 
65
+ if (req.body.filter.search) {
66
+ query.$or = [
67
+ { description: { $regex: search, $options: 'i' } },
68
+ { method: { $regex: search, $options: 'i' } },
69
+ { api: { $regex: search, $options: 'i' } },
70
+ { endpoint: { $regex: search, $options: 'i' } }
71
+ ];
72
+ }
73
+
65
74
  const count = await Permission.countDocuments(query, attributes)
66
75
  let items
67
76
 
@@ -156,6 +156,13 @@ self.retrievePages = async (req, res) => {
156
156
  let query = {}
157
157
  let attributes = { pwd: 0, tokens: 0 }
158
158
 
159
+ if (req.body.filter.search) {
160
+ query.$or = [
161
+ { name: { $regex: search, $options: 'i' } },
162
+ { lastName: { $regex: search, $options: 'i' } }
163
+ ];
164
+ }
165
+
159
166
  const count = await User.countDocuments(query, attributes)
160
167
  let items
161
168
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aloux-iam",
3
- "version": "0.0.131",
3
+ "version": "0.0.132",
4
4
  "description": "Aloux IAM for APIs ",
5
5
  "main": "index.js",
6
6
  "scripts": {