mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: solution.getMulti: allow extra args
This commit is contained in:
1 file changed
+2
-2
@@ -39,10 +39,10 @@ class SolutionModel {
|
||||
return document.count(domainId, document.TYPE_PROBLEM_SOLUTION, query);
|
||||
}
|
||||
|
||||
static getMulti(domainId: string, pid: number) {
|
||||
static getMulti(domainId: string, pid: number, query: any = {}) {
|
||||
return document.getMulti(
|
||||
domainId, document.TYPE_PROBLEM_SOLUTION,
|
||||
{ parentType: document.TYPE_PROBLEM, parentId: pid },
|
||||
{ parentType: document.TYPE_PROBLEM, parentId: pid, ...query },
|
||||
).sort({ vote: -1 });
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user