2017-08-08 19:18:34 +08:00
|
|
|
import interfaceColModel from '../models/interfaceCol.js';
|
|
|
|
import baseController from './base.js';
|
|
|
|
import yapi from '../yapi.js';
|
|
|
|
|
|
|
|
class interfaceColController extends baseController{
|
|
|
|
constructor(ctx) {
|
|
|
|
super(ctx);
|
|
|
|
this.Model = yapi.getInst(interfaceColModel);
|
|
|
|
}
|
|
|
|
|
2017-08-08 19:47:36 +08:00
|
|
|
async list(ctx){
|
|
|
|
try {
|
|
|
|
let id = ctx.query.project_id;
|
|
|
|
let inst = yapi.getInst(interfaceColModel);
|
|
|
|
let result = await inst.list(id);
|
|
|
|
ctx.body = yapi.commons.resReturn(result);
|
|
|
|
} catch (e) {
|
|
|
|
ctx.body = yapi.commons.resReturn(null, 402, e.message);
|
|
|
|
}
|
2017-08-08 19:18:34 +08:00
|
|
|
}
|
|
|
|
|
2017-08-08 19:47:36 +08:00
|
|
|
async up(ctx){
|
2017-08-08 19:18:34 +08:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-08-08 19:47:36 +08:00
|
|
|
async del(ctx){
|
|
|
|
|
2017-08-08 19:18:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|