增加删除选项
This commit is contained in:
parent
63e6bb971f
commit
517828df04
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user