X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fframework%2Fcore%2Fmodules%2Fapi%2FprojectManagementAPI.js;h=8eace6b29e6f80f8bd7913038ef1034b127e83cb;hb=5a83ca0dc3306b54e1db18b9e05e860fed21324e;hp=d73eb215c980cdcf13a69fef3b79d3cac871658b;hpb=9ba0c5e5f242e6e5be9af960f49fc9765b8eb0ed;p=osm%2FUI.git diff --git a/skyquake/framework/core/modules/api/projectManagementAPI.js b/skyquake/framework/core/modules/api/projectManagementAPI.js index d73eb215c..8eace6b29 100644 --- a/skyquake/framework/core/modules/api/projectManagementAPI.js +++ b/skyquake/framework/core/modules/api/projectManagementAPI.js @@ -36,7 +36,7 @@ ProjectManagement.get = function(req) { uri: utils.confdPort(api_server) + '/api/operational/project', method: 'GET', headers: _.extend({}, constants.HTTP_HEADERS.accept.data, { - 'Authorization': req.get('Authorization') + 'Authorization': req.session && req.session.authorization }), forever: constants.FOREVER_ON, rejectUnauthorized: false, @@ -75,7 +75,7 @@ ProjectManagement.create = function(req) { uri: utils.confdPort(api_server) + '/api/config/project', method: 'POST', headers: _.extend({}, constants.HTTP_HEADERS.accept.data, { - 'Authorization': req.get('Authorization') + 'Authorization': req.session && req.session.authorization }), forever: constants.FOREVER_ON, json: data, @@ -115,7 +115,7 @@ ProjectManagement.update = function(req) { uri: utils.confdPort(api_server) + '/api/config/project', method: 'PUT', headers: _.extend({}, constants.HTTP_HEADERS.accept.data, { - 'Authorization': req.get('Authorization') + 'Authorization': req.session && req.session.authorization }), forever: constants.FOREVER_ON, json: data, @@ -157,7 +157,7 @@ ProjectManagement.delete = function(req) { _.extend(requestHeaders, constants.HTTP_HEADERS.accept.data, constants.HTTP_HEADERS.content_type.data, { - 'Authorization': req.get('Authorization') + 'Authorization': req.session && req.session.authorization }); rp({ url: url,