Fix options

This commit is contained in:
Mr Swift
2024-08-17 11:49:59 +03:30
parent ba6f1bd1bb
commit 1faa12e156
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -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 })))