代碼跑通了,數據庫插不進去
?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}
、
2022-05-23
數據庫的接連情況是怎么樣的呢?