Remove use of deprecated storage api

This commit is contained in:
Nick O'Leary 2015-04-04 19:25:07 +01:00
parent b96ea36b70
commit f459ff8ad0
1 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ module.exports = {
});
},
get: function(req,res) {
storage.getFlow(req.params[0]).then(function(data) {
storage.getLibraryEntry("flows",req.params[0]).then(function(data) {
// data is already a JSON string
res.set('Content-Type', 'application/json');
res.send(data);
@ -91,7 +91,7 @@ module.exports = {
},
post: function(req,res) {
var flow = JSON.stringify(req.body);
storage.saveFlow(req.params[0],flow).then(function() {
storage.saveLibraryEntry("flows",req.params[0],{},flow).then(function() {
res.send(204);
}).otherwise(function(err) {
log.warn("Error loading flow '"+req.params[0]+"' : "+err);