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
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
c0bb6f99f8
Коммит
19b753467d
@@ -1324,6 +1324,29 @@ export function addIncomingHook(hook, success, error) {
|
||||
);
|
||||
}
|
||||
|
||||
export function updateIncomingHook(hook, success, error) {
|
||||
Client.updateIncomingHook(
|
||||
hook,
|
||||
(data) => {
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.UPDATED_INCOMING_WEBHOOK,
|
||||
incomingWebhook: data
|
||||
});
|
||||
|
||||
if (success) {
|
||||
success(data);
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
if (error) {
|
||||
error(err);
|
||||
} else {
|
||||
dispatchError(err, 'updateIncomingHook');
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export function addOutgoingHook(hook, success, error) {
|
||||
Client.addOutgoingHook(
|
||||
hook,
|
||||
@@ -1347,6 +1370,29 @@ export function addOutgoingHook(hook, success, error) {
|
||||
);
|
||||
}
|
||||
|
||||
export function updateOutgoingHook(hook, success, error) {
|
||||
Client.updateOutgoingHook(
|
||||
hook,
|
||||
(data) => {
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.UPDATED_OUTGOING_WEBHOOK,
|
||||
outgoingWebhook: data
|
||||
});
|
||||
|
||||
if (success) {
|
||||
success(data);
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
if (error) {
|
||||
error(err);
|
||||
} else {
|
||||
dispatchError(err, 'updateOutgoingHook');
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export function deleteIncomingHook(id) {
|
||||
Client.deleteIncomingHook(
|
||||
id,
|
||||
|
||||
@@ -105,6 +105,7 @@ export const ActionTypes = keyMirror({
|
||||
|
||||
RECEIVED_INCOMING_WEBHOOKS: null,
|
||||
RECEIVED_INCOMING_WEBHOOK: null,
|
||||
UPDATED_INCOMING_WEBHOOK: null,
|
||||
REMOVED_INCOMING_WEBHOOK: null,
|
||||
RECEIVED_OUTGOING_WEBHOOKS: null,
|
||||
RECEIVED_OUTGOING_WEBHOOK: null,
|
||||
|
||||
Ссылка в новой задаче
Block a user