| 251 | |
| 252 | @param('pids', Types.NumericArray) |
| 253 | async postHide(domainId: string, pids: number[]) { |
| 254 | for (const pid of pids) { |
| 255 | // eslint-disable-next-line no-await-in-loop |
| 256 | const pdoc = await problem.get(domainId, pid); |
| 257 | if (!pdoc) throw new ProblemNotFoundError(domainId, pid); |
| 258 | if (!this.user.own(pdoc, PERM.PERM_EDIT_PROBLEM_SELF)) this.checkPerm(PERM.PERM_EDIT_PROBLEM); |
| 259 | // eslint-disable-next-line no-await-in-loop |
| 260 | await problem.edit(domainId, pid, { hidden: true }); |
| 261 | } |
| 262 | this.back(); |
| 263 | } |
| 264 | |
| 265 | @param('pids', Types.NumericArray) |
| 266 | async postUnhide(domainId: string, pids: number[]) { |