| 11 | */ |
| 12 | @injectable() |
| 13 | export default class DpTaskController implements Controller { |
| 14 | @inject(TYPES.DpTaskService) |
| 15 | private dpTaskService!: DpTaskService; |
| 16 | |
| 17 | public async detail(id: number) { |
| 18 | return this.dpTaskService.detail(id); |
| 19 | } |
| 20 | |
| 21 | public async details(ids: number[]): Promise<Map<number, DpTask>> { |
| 22 | return this.dpTaskService.details(ids); |
| 23 | } |
| 24 | |
| 25 | public async cancel(id: number) { |
| 26 | this.dpTaskService.cancel(id); |
| 27 | } |
| 28 | |
| 29 | registerRoutes(): void { |
| 30 | registerRoute('dp-task/detail', (p) => this.detail(p)); |
| 31 | registerRoute('dp-task/cancel', (p) => this.cancel(p)); |
| 32 | registerRoute('dp-task/details', (p) => this.details(p)); |
| 33 | } |
| 34 | |
| 35 | } |
nothing calls this directly
no outgoing calls
no test coverage detected