From b6b6cd0e87aae6a1b002355fbef6426aa227c588 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Mon, 15 Aug 2016 15:03:24 -0400 Subject: [PATCH] destroy method for run model --- controllers/runs.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/controllers/runs.js b/controllers/runs.js index 450de2c..c8aefef 100644 --- a/controllers/runs.js +++ b/controllers/runs.js @@ -16,4 +16,14 @@ controller.post('/', function(req, res){ });; }); +controller.delete('/:id', function(req, res){ + Runs.destroy({ + where: { + id: req.params.id + } + }).then(function(didSucceed){ + res.json(didSucceed); + }); +}); + module.exports = controller;