| 264 | |
| 265 | @param('pids', Types.NumericArray) |
| 266 | async postUnhide(domainId: string, pids: number[]) { |
| 267 | for (const pid of pids) { |
| 268 | // eslint-disable-next-line no-await-in-loop |
| 269 | const pdoc = await problem.get(domainId, pid); |
| 270 | if (!pdoc) throw new ProblemNotFoundError(domainId, pid); |
| 271 | if (!this.user.own(pdoc, PERM.PERM_EDIT_PROBLEM_SELF)) this.checkPerm(PERM.PERM_EDIT_PROBLEM); |
| 272 | // eslint-disable-next-line no-await-in-loop |
| 273 | await problem.edit(domainId, pid, { hidden: false }); |
| 274 | } |
| 275 | this.back(); |
| 276 | } |
| 277 | } |
| 278 | |
| 279 | export class ProblemRandomHandler extends Handler { |