From a0f3ee032859288c61118d7b5f4e36ca934fe3c9 Mon Sep 17 00:00:00 2001 From: undefined Date: Sun, 28 Jan 2024 09:58:49 +0800 Subject: [PATCH] core: problem_list: use new pagination api --- packages/hydrooj/src/handler/problem.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hydrooj/src/handler/problem.ts b/packages/hydrooj/src/handler/problem.ts index 2ffc5c414..10c55eb93 100644 --- a/packages/hydrooj/src/handler/problem.ts +++ b/packages/hydrooj/src/handler/problem.ts @@ -137,7 +137,7 @@ export class ProblemMainHandler extends Handler { @param('pjax', Types.Boolean) async get(domainId: string, page = 1, q = '', limit: number, pjax = false) { this.response.template = 'problem_main.html'; - if (!limit || limit > system.get('pagination.problem') || page > 1) limit = system.get('pagination.problem'); + if (!limit || limit > this.ctx.setting.get('pagination.problem') || page > 1) limit = this.ctx.setting.get('pagination.problem'); // eslint-disable-next-line @typescript-eslint/no-shadow const query = buildQuery(this.user); const psdict = {};