projects
/
osm
/
UI.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge changes I708f8fc2,Ife664a90,I5ea07463 into projects
[osm/UI.git]
/
skyquake
/
framework
/
core
/
modules
/
api
/
projectManagementAPI.js
diff --git
a/skyquake/framework/core/modules/api/projectManagementAPI.js
b/skyquake/framework/core/modules/api/projectManagementAPI.js
index
25fcebe
..
195f457
100644
(file)
--- 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) {
});
};
ProjectManagement.update = function(req) {
+ //"rw-project:project"
var self = this;
var api_server = req.query['api_server'];
var bodyData = req.body;
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({
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
method: 'PUT',
headers: _.extend({}, constants.HTTP_HEADERS.accept.data, {
'Authorization': req.session && req.session.authorization