Merge branch 'projects' into sshkey-management

This commit is contained in:
Hideki Nakamura
2017-12-07 23:29:58 +09:00
5 changed files with 103 additions and 1 deletions

View File

@@ -117,6 +117,13 @@ module.exports = {
// Delete project - tbd
app.delete("/:id", needsPermission("projects.write"), function(req,res) {
runtime.storage.projects.deleteProject(req.user, req.params.id).then(function() {
res.status(204).end();
})
.catch(function(err) {
console.log(err.stack);
res.status(400).json({error:"unexpected_error", message:err.toString()})
});
});