Fix options
This commit is contained in:
@@ -30,8 +30,8 @@ module.exports.getAll = async (req, res) => {
|
||||
const score = await Score.find({
|
||||
userId: req.user_id,
|
||||
$or: [
|
||||
{ title: { $regex: search, $options: 'i' } },
|
||||
{ score: { $regex: search, $options: 'i' } },
|
||||
{ title: { $regex: search } },
|
||||
{ score: { $regex: search } },
|
||||
],
|
||||
}).skip(page).limit(rows);
|
||||
const total = Math.ceil((await Score.countDocuments({ userId: req.user_id })))
|
||||
|
||||
Reference in New Issue
Block a user