mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: 支持搜索题号
This commit is contained in:
1 parent
cd3c74649c
commit
cc58aa667e
2 files changed
+3
-3
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "2.28.49",
|
"version": "2.28.50",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "dist/loader.js",
|
"main": "dist/loader.js",
|
||||||
"typings": "dist/loader.d.ts",
|
"typings": "dist/loader.d.ts",
|
||||||
|
|||||||
@@ -98,8 +98,8 @@ export class ProblemMainHandler extends ProblemHandler {
|
|||||||
system.get('pagination.problem'),
|
system.get('pagination.problem'),
|
||||||
);
|
);
|
||||||
if (sort) pdocs = pdocs.sort((a, b) => sort.indexOf(a.docId) - sort.indexOf(b.docId));
|
if (sort) pdocs = pdocs.sort((a, b) => sort.indexOf(a.docId) - sort.indexOf(b.docId));
|
||||||
if (q && +q) {
|
if (q) {
|
||||||
const pdoc = await problem.get(domainId, +q, problem.PROJECTION_LIST);
|
const pdoc = await problem.get(domainId, +q || q, problem.PROJECTION_LIST);
|
||||||
if (pdoc) pdocs.filter((doc) => doc.docId !== pdoc.docId).unshift(pdoc);
|
if (pdoc) pdocs.filter((doc) => doc.docId !== pdoc.docId).unshift(pdoc);
|
||||||
}
|
}
|
||||||
if (this.user.hasPriv(PRIV.PRIV_USER_PROFILE)) {
|
if (this.user.hasPriv(PRIV.PRIV_USER_PROFILE)) {
|
||||||
|
|||||||
Reference in new issue
Block a user