MCPcopy Create free account
hub / github.com/coderwhy/coderhub / LabelController

Class LabelController

src/controller/label.controller.js:3–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1const service = require('../service/label.service');
2
3class 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
17module.exports = new LabelController();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected