diff --git a/controllers/index.js b/controllers/index.js index 4e3c260..214b521 100644 --- a/controllers/index.js +++ b/controllers/index.js @@ -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 }