summaryrefslogtreecommitdiffstats
path: root/webapp/utils
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-06-19 13:55:47 -0400
committerChristopher Speller <crspeller@gmail.com>2017-06-19 10:55:47 -0700
commitef9326bcbb461b4f3265f75a9f738e67e58b88d1 (patch)
tree1d2abc5304be4df51762985753ede12749f3bf43 /webapp/utils
parent1594cf8af102d0ffe7c62fc68004049e918a530a (diff)
downloadchat-ef9326bcbb461b4f3265f75a9f738e67e58b88d1.tar.gz
chat-ef9326bcbb461b4f3265f75a9f738e67e58b88d1.tar.bz2
chat-ef9326bcbb461b4f3265f75a9f738e67e58b88d1.zip
Move integrations over to redux and v4 (#6679)
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;