mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +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",
|
||||
"version": "2.28.49",
|
||||
"version": "2.28.50",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "dist/loader.js",
|
||||
"typings": "dist/loader.d.ts",
|
||||
|
||||
@@ -98,8 +98,8 @@ export class ProblemMainHandler extends ProblemHandler {
|
||||
system.get('pagination.problem'),
|
||||
);
|
||||
if (sort) pdocs = pdocs.sort((a, b) => sort.indexOf(a.docId) - sort.indexOf(b.docId));
|
||||
if (q && +q) {
|
||||
const pdoc = await problem.get(domainId, +q, problem.PROJECTION_LIST);
|
||||
if (q) {
|
||||
const pdoc = await problem.get(domainId, +q || q, problem.PROJECTION_LIST);
|
||||
if (pdoc) pdocs.filter((doc) => doc.docId !== pdoc.docId).unshift(pdoc);
|
||||
}
|
||||
if (this.user.hasPriv(PRIV.PRIV_USER_PROFILE)) {
|
||||
|
||||
Reference in new issue
Block a user