switch (v['type']){
case 100:
await MovieDao.addMovie(v)
break
}
}
import { LinRouter, success } from 'lin-mizar';
import { ContentService } from '../../service/content';
import { addContentValidator, contentValidator } from '../../validators/content';
const contentApi=new LinRouter(
{
prefix: "/v1/content",
}
)
contentApi.post('/', async ctx => {
const v= await new addContentValidator().validate(ctx)
await ContentService.addcontent(v.get('body'))
ctx .success({
msg:'请求成功'
})
})
module.exports={ contentApi}
、
数据库的接连情况是怎么样的呢?