aloux-iam 0.0.132 → 0.0.133
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,9 +44,9 @@ 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
|
|
47
|
+
if (req?.body?.filter?.search) {
|
|
48
48
|
query.$or = [
|
|
49
|
-
{ name: { $regex: search, $options: 'i' } }
|
|
49
|
+
{ name: { $regex: req.body.filter.search, $options: 'i' } }
|
|
50
50
|
];
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -57,10 +57,10 @@ self.retrievePages = async (req, res) => {
|
|
|
57
57
|
let query = {}
|
|
58
58
|
let attributes = { pwd: 0, tokens: 0 }
|
|
59
59
|
|
|
60
|
-
if (req
|
|
60
|
+
if (req?.body?.filter?.search) {
|
|
61
61
|
query.$or = [
|
|
62
|
-
{ name: { $regex: search, $options: 'i' } },
|
|
63
|
-
{ description: { $regex: search, $options: 'i' } }
|
|
62
|
+
{ name: { $regex: req.body.filter.search, $options: 'i' } },
|
|
63
|
+
{ description: { $regex: req.body.filter.search, $options: 'i' } }
|
|
64
64
|
];
|
|
65
65
|
}
|
|
66
66
|
|
package/lib/controllers/menu.js
CHANGED
|
@@ -60,11 +60,11 @@ self.retrievePages = async (req, res) => {
|
|
|
60
60
|
let query = {}
|
|
61
61
|
let attributes = { pwd: 0, tokens: 0 }
|
|
62
62
|
|
|
63
|
-
if (req
|
|
63
|
+
if (req?.body?.filter?.search) {
|
|
64
64
|
query.$or = [
|
|
65
|
-
{ label: { $regex: search, $options: 'i' } },
|
|
66
|
-
{ description: { $regex: search, $options: 'i' } },
|
|
67
|
-
{ path: { $regex: search, $options: 'i' } }
|
|
65
|
+
{ label: { $regex: req.body.filter.search, $options: 'i' } },
|
|
66
|
+
{ description: { $regex: req.body.filter.search, $options: 'i' } },
|
|
67
|
+
{ path: { $regex: req.body.filter.search, $options: 'i' } }
|
|
68
68
|
];
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -62,12 +62,12 @@ self.retrievePages = async (req, res) => {
|
|
|
62
62
|
let query = {}
|
|
63
63
|
let attributes = { pwd: 0, tokens: 0 }
|
|
64
64
|
|
|
65
|
-
if (req
|
|
65
|
+
if (req?.body?.filter?.search) {
|
|
66
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' } }
|
|
67
|
+
{ description: { $regex: req.body.filter.search, $options: 'i' } },
|
|
68
|
+
{ method: { $regex: req.body.filter.search, $options: 'i' } },
|
|
69
|
+
{ api: { $regex: req.body.filter.search, $options: 'i' } },
|
|
70
|
+
{ endpoint: { $regex: req.body.filter.search, $options: 'i' } }
|
|
71
71
|
];
|
|
72
72
|
}
|
|
73
73
|
|
package/lib/controllers/user.js
CHANGED
|
@@ -156,10 +156,10 @@ self.retrievePages = async (req, res) => {
|
|
|
156
156
|
let query = {}
|
|
157
157
|
let attributes = { pwd: 0, tokens: 0 }
|
|
158
158
|
|
|
159
|
-
if (req
|
|
159
|
+
if (req?.body?.filter?.search) {
|
|
160
160
|
query.$or = [
|
|
161
|
-
{ name: { $regex: search, $options: 'i' } },
|
|
162
|
-
{ lastName: { $regex: search, $options: 'i' } }
|
|
161
|
+
{ name: { $regex: req.body.filter.search, $options: 'i' } },
|
|
162
|
+
{ lastName: { $regex: req.body.filter.search, $options: 'i' } }
|
|
163
163
|
];
|
|
164
164
|
}
|
|
165
165
|
|