diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-09-16 10:51:40 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-09-16 15:15:30 +0200 |
commit | b06dde3fe95d61bd6c893947f7d5fba6263614e2 (patch) | |
tree | c0d4c4bcf53f83c04817ff612be8bd4de2ad2480 | |
parent | 65d3b1d057c3c1265b23b75911c51cfa863ad817 (diff) | |
download | sonarqube-b06dde3fe95d61bd6c893947f7d5fba6263614e2.tar.gz sonarqube-b06dde3fe95d61bd6c893947f7d5fba6263614e2.zip |
SONAR-7907 update ui
-rw-r--r-- | server/sonar-web/src/main/js/apps/users/user.js | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/server/sonar-web/src/main/js/apps/users/user.js b/server/sonar-web/src/main/js/apps/users/user.js index f9898e9b176..61c9dd94535 100644 --- a/server/sonar-web/src/main/js/apps/users/user.js +++ b/server/sonar-web/src/main/js/apps/users/user.js @@ -35,13 +35,9 @@ export default Backbone.Model.extend({ }, toQuery () { - const q = this.toJSON(); - _.each(q, function (value, key) { - if (_.isArray(value)) { - q[key] = value.join(','); - } - }); - return q; + const data = { ...this.toJSON(), scmAccount: this.get('scmAccounts') }; + delete data.scmAccounts; + return data; }, isNew () { @@ -55,14 +51,16 @@ export default Backbone.Model.extend({ _.defaults(opts, { url: this.urlRoot() + '/create', type: 'POST', - data: _.pick(model.toQuery(), 'login', 'name', 'email', 'password', 'scmAccounts') + data: _.pick(model.toQuery(), 'login', 'name', 'email', 'password', 'scmAccount'), + traditional: true }); } if (method === 'update') { _.defaults(opts, { url: this.urlRoot() + '/update', type: 'POST', - data: _.pick(model.toQuery(), 'login', 'name', 'email', 'scmAccounts') + data: _.pick(model.toQuery(), 'login', 'name', 'email', 'scmAccount'), + traditional: true }); } if (method === 'delete') { |