'use strict'; const Controller = require('egg').Controller; class ColumnController extends Controller { async create() { const { ctx } = this; const res = await ctx.service.contentType.create(ctx.request.body); ctx.body = res; } async update() { const { ctx } = this; const res = await ctx.service.contentType.update(ctx.request.body); ctx.body = res; } async del() { const { ctx } = this; const res = await ctx.service.contentType.del(ctx.params); ctx.body = res; } async query() { const { ctx } = this; const res = await ctx.service.contentType.query(ctx.query); ctx.body = res; } } module.exports = ColumnController;