mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
sonic: fix imvalid limit error
This commit is contained in:
1 parent
6924875ec9
commit
23880f11fa
2 files changed
+2
-2
No files matched your search
@@ -22,6 +22,6 @@ bus.on('problem/del', async (domainId, docId) => {
|
||||
global.Hydro.lib.problemSearch = async (domainId: string, query: string) => {
|
||||
const c = system.get('pagination.problem');
|
||||
const docIds = await sonic.query('problem', `${domainId}@title`, query, { limit: c });
|
||||
docIds.push(...await sonic.query('problem', `${domainId}@content`, query, { limit: c - docIds.length }));
|
||||
if (c - docIds.length > 0) docIds.push(...await sonic.query('problem', `${domainId}@content`, query, { limit: c - docIds.length }));
|
||||
return docIds.map(Number);
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/sonic",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"description": "Sonic search service",
|
||||
"main": "service.js",
|
||||
"typings": "service.d.ts",
|
||||
|
||||
Reference in new issue
Block a user