summaryrefslogtreecommitdiffstats
path: root/webapp/utils
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/utils')
-rw-r--r--webapp/utils/async_client.jsx216
1 files changed, 0 insertions, 216 deletions
diff --git a/webapp/utils/async_client.jsx b/webapp/utils/async_client.jsx
index deb967e3a..820199339 100644
--- a/webapp/utils/async_client.jsx
+++ b/webapp/utils/async_client.jsx
@@ -712,222 +712,6 @@ export function getRecentAndNewUsersAnalytics(teamId) {
);
}
-export function addIncomingHook(hook, success, error) {
- Client.addIncomingHook(
- hook,
- (data) => {
- AppDispatcher.handleServerAction({
- type: ActionTypes.RECEIVED_INCOMING_WEBHOOK,
- incomingWebhook: data
- });
-
- if (success) {
- success(data);
- }
- },
- (err) => {
- if (error) {
- error(err);
- } else {
- dispatchError(err, 'addIncomingHook');
- }
- }
- );
-}
-
-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,
- (data) => {
- AppDispatcher.handleServerAction({
- type: ActionTypes.RECEIVED_OUTGOING_WEBHOOK,
- outgoingWebhook: data
- });
-
- if (success) {
- success(data);
- }
- },
- (err) => {
- if (error) {
- error(err);
- } else {
- dispatchError(err, 'addOutgoingHook');
- }
- }
- );
-}
-
-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,
- () => {
- AppDispatcher.handleServerAction({
- type: ActionTypes.REMOVED_INCOMING_WEBHOOK,
- teamId: Client.teamId,
- id
- });
- },
- (err) => {
- dispatchError(err, 'deleteIncomingHook');
- }
- );
-}
-
-export function deleteOutgoingHook(id) {
- Client.deleteOutgoingHook(
- id,
- () => {
- AppDispatcher.handleServerAction({
- type: ActionTypes.REMOVED_OUTGOING_WEBHOOK,
- teamId: Client.teamId,
- id
- });
- },
- (err) => {
- dispatchError(err, 'deleteOutgoingHook');
- }
- );
-}
-
-export function regenOutgoingHookToken(id) {
- Client.regenOutgoingHookToken(
- id,
- (data) => {
- AppDispatcher.handleServerAction({
- type: ActionTypes.UPDATED_OUTGOING_WEBHOOK,
- outgoingWebhook: data
- });
- },
- (err) => {
- dispatchError(err, 'regenOutgoingHookToken');
- }
- );
-}
-
-export function addCommand(command, success, error) {
- Client.addCommand(
- command,
- (data) => {
- AppDispatcher.handleServerAction({
- type: ActionTypes.RECEIVED_COMMAND,
- command: data
- });
-
- if (success) {
- success(data);
- }
- },
- (err) => {
- if (error) {
- error(err);
- } else {
- dispatchError(err, 'addCommand');
- }
- }
- );
-}
-
-export function editCommand(command, success, error) {
- Client.editCommand(
- command,
- (data) => {
- AppDispatcher.handleServerAction({
- type: ActionTypes.UPDATED_COMMAND,
- command: data
- });
-
- if (success) {
- success(data);
- }
- },
- (err) => {
- if (error) {
- error(err);
- } else {
- dispatchError(err, 'editCommand');
- }
- }
- );
-}
-
-export function deleteCommand(id) {
- Client.deleteCommand(
- id,
- () => {
- AppDispatcher.handleServerAction({
- type: ActionTypes.REMOVED_COMMAND,
- teamId: Client.teamId,
- id
- });
- },
- (err) => {
- dispatchError(err, 'deleteCommand');
- }
- );
-}
-
-export function regenCommandToken(id) {
- Client.regenCommandToken(
- id,
- (data) => {
- AppDispatcher.handleServerAction({
- type: ActionTypes.UPDATED_COMMAND,
- command: data
- });
- },
- (err) => {
- dispatchError(err, 'regenCommandToken');
- }
- );
-}
-
export function getPublicLink(fileId, success, error) {
const callName = 'getPublicLink' + fileId;