Signed-off-by: Laurence Maultsby <laurence.maultsby@riftio.com>
var api_server = req.query['api_server'];
var bodyData = req.body;
data = bodyData;
+ data.user = JSON.parse(data.user)
var updateTasks = [];
var updateUser = rp({
this.Store.updatePlatform({
- 'user': platformUsers
+ 'user': JSON.stringify(platformUsers)
}
);
}
url: `/platform?api_server=${API_SERVER}`,
type: 'PUT',
data: project,
+ dataType: 'json',
beforeSend: Utils.addAuthorizationStub,
success: function(data, textStatus, jqXHR) {
resolve(data);
})
} else {
let role = platformUsers[userIndex].role;
- platformUsers[userIndex].role.splice(roleIndex, 1)
+ platformUsers[userIndex].role.splice(_.findIndex(role, function(r) { return r.role == selectedRole; }), 1)
}
self.setState({platformUsers});