mirror of
https://github.com/wassname/talk.git
synced 2026-07-24 13:20:47 +08:00
Fix asset search skip limit bug
This commit is contained in:
+8
-5
@@ -92,11 +92,14 @@ module.exports = class AssetsService {
|
||||
if (value.length === 0) {
|
||||
return AssetsService.all(skip, limit);
|
||||
} else {
|
||||
return AssetModel.find({
|
||||
$text: {
|
||||
$search: value
|
||||
}
|
||||
});
|
||||
return AssetModel
|
||||
.find({
|
||||
$text: {
|
||||
$search: value
|
||||
}
|
||||
})
|
||||
.skip(skip)
|
||||
.limit(limit);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user