| 1 | const service = require('../service/label.service'); |
| 2 | |
| 3 | class LabelController { |
| 4 | async create(ctx, next) { |
| 5 | const { name } = ctx.request.body; |
| 6 | const result = await service.create(name); |
| 7 | ctx.body = result; |
| 8 | } |
| 9 | |
| 10 | async list(ctx, next) { |
| 11 | const { limit, offset } = ctx.query; |
| 12 | const result = await service.getLabels(limit, offset); |
| 13 | ctx.body = result; |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | module.exports = new LabelController(); |
nothing calls this directly
no outgoing calls
no test coverage detected