From 288cfb7d047b5beb2a6f05e58834b4d39c8d6e46 Mon Sep 17 00:00:00 2001 From: Laurence Maultsby Date: Wed, 3 May 2017 14:14:32 -0400 Subject: [PATCH] Allow for project description change Signed-off-by: Laurence Maultsby --- .../core/modules/api/projectManagementAPI.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/skyquake/framework/core/modules/api/projectManagementAPI.js b/skyquake/framework/core/modules/api/projectManagementAPI.js index 25fcebe5c..195f45700 100644 --- a/skyquake/framework/core/modules/api/projectManagementAPI.js +++ b/skyquake/framework/core/modules/api/projectManagementAPI.js @@ -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 -- 2.25.1