Adding edit of incoming webhook (#5272)

Adding edit of outgoing webhook
Fixing spelling of error
Fixing style
Changing from PUT to POST for updates
Fixing test failures due to merge
Этот коммит содержится в:
Poornima
2017-02-27 00:18:20 +05:30
коммит произвёл Joram Wilander
родитель c0bb6f99f8
Коммит 19b753467d
35 изменённых файлов: 1939 добавлений и 763 удалений

Просмотреть файл

@@ -1975,6 +1975,18 @@ export default class Client {
this.trackEvent('api', 'api_integrations_created', {team_id: this.getTeamId()});
}
updateIncomingHook(hook, success, error) {
request.
post(`${this.getHooksRoute()}/incoming/update`).
set(this.defaultHeaders).
type('application/json').
accept('application/json').
send(hook).
end(this.handleResponse.bind(this, 'updateIncomingHook', success, error));
this.trackEvent('api', 'api_integrations_updated', {team_id: this.getTeamId()});
}
deleteIncomingHook(hookId, success, error) {
request.
post(`${this.getHooksRoute()}/incoming/delete`).
@@ -2008,6 +2020,18 @@ export default class Client {
this.trackEvent('api', 'api_integrations_created', {team_id: this.getTeamId()});
}
updateOutgoingHook(hook, success, error) {
request.
post(`${this.getHooksRoute()}/outgoing/update`).
set(this.defaultHeaders).
type('application/json').
accept('application/json').
send(hook).
end(this.handleResponse.bind(this, 'updateOutgoingHook', success, error));
this.trackEvent('api', 'api_integrations_updated', {team_id: this.getTeamId()});
}
deleteOutgoingHook(hookId, success, error) {
request.
post(`${this.getHooksRoute()}/outgoing/delete`).