PLT-7309: Fix webook management when permitted for non-admins. (#7132)

Этот коммит содержится в:
George Goldberg
2017-08-08 13:45:17 +01:00
коммит произвёл Joram Wilander
родитель 82407bd44a
Коммит 5132c62d15
3 изменённых файлов: 32 добавлений и 4 удалений

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

@@ -33,6 +33,20 @@ export function loadIncomingHooks(complete) {
);
}
export function loadIncomingHooksForTeam(teamId, complete) {
IntegrationActions.getIncomingHooks(teamId, 0, 10000)(dispatch, getState).then(
(data) => {
if (data) {
loadProfilesForIncomingHooks(data);
}
if (complete) {
complete(data);
}
}
);
}
function loadProfilesForIncomingHooks(hooks) {
const profilesToLoad = {};
for (let i = 0; i < hooks.length; i++) {
@@ -64,6 +78,20 @@ export function loadOutgoingHooks(complete) {
);
}
export function loadOutgoingHooksForTeam(teamId, complete) {
IntegrationActions.getOutgoingHooks('', teamId, 0, 10000)(dispatch, getState).then(
(data) => {
if (data) {
loadProfilesForOutgoingHooks(data);
}
if (complete) {
complete(data);
}
}
);
}
function loadProfilesForOutgoingHooks(hooks) {
const profilesToLoad = {};
for (let i = 0; i < hooks.length; i++) {