intact.js 744 B

123456789101112131415161718192021222324252627
  1. 'use strict';
  2. const Controller = require('egg').Controller;
  3. class LntactController extends Controller {
  4. async create() {
  5. const res = await this.ctx.service.intact.create(this.ctx.request.body);
  6. this.ctx.body = res;
  7. }
  8. async update() {
  9. const res = await this.ctx.service.intact.update(this.ctx.request.body);
  10. this.ctx.body = res;
  11. }
  12. async delete() {
  13. const res = await this.ctx.service.intact.delete(this.ctx.params);
  14. this.ctx.body = res;
  15. }
  16. async query() {
  17. const res = await this.ctx.service.intact.query(this.ctx.query);
  18. this.ctx.body = res;
  19. }
  20. async fetch() {
  21. const res = await this.ctx.service.intact.fetch(this.ctx.query);
  22. this.ctx.body = res;
  23. }
  24. }
  25. module.exports = LntactController;