Skip to content

Commit

Permalink
Merge pull request #6796 from RocketChat/fix-api-user.update-rate-lim…
Browse files Browse the repository at this point in the history
…it-error

[FIX] REST API user.update throwing error due to rate limiting
  • Loading branch information
rodrigok authored Apr 27, 2017
2 parents 8134fef + 94e1ed5 commit 157fe80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rocketchat-api/server/v1/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ RocketChat.API.v1.addRoute('users.update', { authRequired: true }, {

const userData = _.extend({ _id: this.bodyParams.userId }, this.bodyParams.data);

RocketChat.saveUser(this.userId, userData);
Meteor.runAsUser(this.userId, () => RocketChat.saveUser(this.userId, userData));

if (this.bodyParams.data.customFields) {
RocketChat.saveCustomFields(this.bodyParams.userId, this.bodyParams.data.customFields);
Expand Down

0 comments on commit 157fe80

Please sign in to comment.