Allow for project description change
authorLaurence Maultsby <laurence.maultsby@riftio.com>
Wed, 3 May 2017 18:14:32 +0000 (14:14 -0400)
committerLaurence Maultsby <laurence.maultsby@riftio.com>
Wed, 3 May 2017 18:14:32 +0000 (14:14 -0400)
Signed-off-by: Laurence Maultsby <laurence.maultsby@riftio.com>
skyquake/framework/core/modules/api/projectManagementAPI.js

index 25fcebe..195f457 100644 (file)
@@ -104,14 +104,21 @@ ProjectManagement.create = function(req) {
     });
 };
 ProjectManagement.update = function(req) {
+    //"rw-project:project"
     var self = this;
     var api_server = req.query['api_server'];
     var bodyData = req.body;
-    data = bodyData['project-config']
+    var data = {
+        "rw-project:project" : {
+            "name": bodyData.name,
+            "description": bodyData.description,
+            "project-config": bodyData['project-config']
+        }
+    }
     var updateTasks = [];
 
     var updateProject= rp({
-                uri: utils.confdPort(api_server) + '/api/config/project/' + bodyData.name + '/project-config',
+                uri: utils.confdPort(api_server) + '/api/config/project/',
                 method: 'PUT',
                 headers: _.extend({}, constants.HTTP_HEADERS.accept.data, {
                     'Authorization': req.session && req.session.authorization