| 235 | |
| 236 | @param('pids', Types.NumericArray) |
| 237 | async postDelete(domainId: string, pids: number[]) { |
| 238 | let i = 0; |
| 239 | for (const pid of pids) { |
| 240 | // eslint-disable-next-line no-await-in-loop |
| 241 | const pdoc = await problem.get(domainId, pid); |
| 242 | if (!pdoc) continue; |
| 243 | if (!this.user.own(pdoc, PERM.PERM_EDIT_PROBLEM_SELF)) this.checkPerm(PERM.PERM_EDIT_PROBLEM); |
| 244 | // eslint-disable-next-line no-await-in-loop |
| 245 | await problem.del(domainId, pid); |
| 246 | i++; |
| 247 | this.progress('Deleting: ({0}/{1})', [i, pids.length]); |
| 248 | } |
| 249 | this.back(); |
| 250 | } |
| 251 | |
| 252 | @param('pids', Types.NumericArray) |
| 253 | async postHide(domainId: string, pids: number[]) { |