删除完善
This commit is contained in:
parent
517828df04
commit
5771c6e423
@ -38,6 +38,12 @@ var getaddlist = async (ctx,next) =>{
|
||||
next()
|
||||
}
|
||||
var dellist = async (ctx,next)=>{
|
||||
if(ctx.query.id == undefined){
|
||||
ctx.body = JSON.stringify({
|
||||
code : 1,
|
||||
msg:"id不能为空"
|
||||
})
|
||||
}else{
|
||||
await dbs.remove('list',{
|
||||
"num_key":ctx.query.id
|
||||
}).then((res)=>{
|
||||
@ -45,6 +51,8 @@ var dellist = async (ctx,next)=>{
|
||||
}).catch((err)=>{
|
||||
ctx.body = JSON.stringify(res)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
module.exports = {
|
||||
'GET /getlist':getlist,
|
||||
|
Loading…
Reference in New Issue
Block a user