mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: api: problems: ensure return order matches query
This commit is contained in:
1 file changed
+1
-1
@@ -1044,7 +1044,7 @@ export const ProblemApi = {
|
||||
async (ctx, args) => {
|
||||
const pdocs = await problem.getList(args.domainId, args.ids, ctx.user.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN) || ctx.user._id,
|
||||
undefined, undefined, true);
|
||||
return Object.keys(pdocs).map((id) => pdocs[+id]);
|
||||
return args.ids.map((id) => pdocs[+id]).filter((i) => i);
|
||||
},
|
||||
),
|
||||
} as const;
|
||||
|
||||
Reference in new issue
Block a user