Skip to content

Commit

Permalink
Fix global variable
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcosSpessatto committed Feb 18, 2019
1 parent 3d79043 commit d94ec51
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/rocketchat-api/server/v1/channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ API.v1.addRoute('channels.moderators', { authRequired: true }, {
},
});

RocketChat.API.v1.addRoute('channels.addLeader', { authRequired: true }, {
API.v1.addRoute('channels.addLeader', { authRequired: true }, {
post() {
const findResult = findChannelByIdOrName({ params: this.requestParams() });

Expand All @@ -981,11 +981,11 @@ RocketChat.API.v1.addRoute('channels.addLeader', { authRequired: true }, {
Meteor.call('addRoomLeader', findResult._id, user._id);
});

return RocketChat.API.v1.success();
return API.v1.success();
},
});

RocketChat.API.v1.addRoute('channels.removeLeader', { authRequired: true }, {
API.v1.addRoute('channels.removeLeader', { authRequired: true }, {
post() {
const findResult = findChannelByIdOrName({ params: this.requestParams() });

Expand All @@ -995,7 +995,7 @@ RocketChat.API.v1.addRoute('channels.removeLeader', { authRequired: true }, {
Meteor.call('removeRoomLeader', findResult._id, user._id);
});

return RocketChat.API.v1.success();
return API.v1.success();
},
});

0 comments on commit d94ec51

Please sign in to comment.