增加删除选项

This commit is contained in:
pplokijuhyg 2019-12-10 14:54:01 +08:00
parent 63e6bb971f
commit 517828df04

View File

@ -37,10 +37,19 @@ var getaddlist = async (ctx,next) =>{
}
next()
}
var dellist = async (ctx,next)=>{
await dbs.remove('list',{
"num_key":ctx.query.id
}).then((res)=>{
ctx.body = JSON.stringify(res)
}).catch((err)=>{
ctx.body = JSON.stringify(res)
})
}
module.exports = {
'GET /getlist':getlist,
'POST /addlist':addlist,
'GET /getaddlist':getaddlist
'GET /getaddlist':getaddlist,
'GET /dellist' : dellist
}