| 663 | @param('d', Types.CommaSeperatedArray, true) |
| 664 | @param('sidebar', Types.Boolean) |
| 665 | async get({ }, d = ['testdata', 'additional_file'], sidebar = false) { |
| 666 | if (this.tdoc) throw new ContestNotEndedError(); |
| 667 | this.response.body.testdata = sortFiles(this.pdoc.data || []); |
| 668 | this.response.body.additional_file = sortFiles(this.pdoc.additional_file || []); |
| 669 | this.response.body.reference = this.pdoc.reference; |
| 670 | this.response.pjax = d.map((i) => ['partials/problem_files.html', { filetype: i, sidebar, can_edit: true }]); |
| 671 | if (!sidebar) this.response.pjax.push(['partials/problem-sidebar-information.html', {}]); |
| 672 | this.response.template = 'problem_files.html'; |
| 673 | } |
| 674 | |
| 675 | async post() { |
| 676 | if (this.args.operation === 'get_links') return; |