Skip to content

Commit

Permalink
added DELETE for listings
Browse files Browse the repository at this point in the history
  • Loading branch information
elf Pavlik committed Nov 10, 2014
1 parent f7d66fe commit c630610
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,18 @@ daemon.get('/', function(req, res){
});
});

daemon.delete('/:uuid', function(req, res){
// TODO add authentication
storage.delete(req.params.uuid)
.then(function(){
res.send(200);
})
.catch(function(err){
// TODO add error reporting
res.send(500);
});
});


daemon.listen(config.listenOn, function(err){
console.log('listening on:', config.listenOn);
Expand Down

0 comments on commit c630610

Please sign in to comment.