Fix options
This commit is contained in:
@@ -61,7 +61,7 @@ module.exports.getAllForUser = async (req, res) => {
|
||||
const data = await InstalledDevice.find({
|
||||
userId: req.user_id,
|
||||
$or: [
|
||||
{ IMEI: { $regex: search, $options: 'i' } },
|
||||
{ IMEI: { $regex: search } },
|
||||
],
|
||||
}).skip(page).limit(rows).sort({ created_at: -1 }).populate('deviceId')
|
||||
|
||||
@@ -92,7 +92,7 @@ module.exports.getAllForAdmin = async (req, res) => {
|
||||
|
||||
const data = await InstalledDevice.find({
|
||||
$or: [
|
||||
{ IMEI: { $regex: search, $options: 'i' } },
|
||||
{ IMEI: { $regex: search } },
|
||||
]
|
||||
}).sort({ status: 1 }).skip(page).limit(rows)
|
||||
.populate('deviceId')
|
||||
|
||||
Reference in New Issue
Block a user