axios .put(`${baseURI}auth/users`, credentials) .then((json = {}) => json.data) .then(data => { AppDispatcher.dispatchServerAction({ type: ActionTypes.AUTH_CREATE_USER_SUCCESS, data, }); })
const getSlackPrivateChannelList = (communityId: string, token: ?string) => { if (!token) return []; const decryptedToken = decryptString(token); return axios .get( `https://slack.com/api/groups.list?token=${decryptedToken}&exclude_archived=true&exclude_members=true` ) .then(response => { return handleSlackChannelResponse(response.data, communityId); }) .catch(error => { console.error('\n\nerror', error); return []; }); }
axios .get(`${baseURI}api/mediainfo`, { params: { hash: options.hash, }, }) .then((json = {}) => json.data) .then(response => { AppDispatcher.dispatchServerAction({ type: ActionTypes.FLOOD_FETCH_MEDIAINFO_SUCCESS, data: { ...response, ...options, }, }); })
componentDidMount() { axios.get(AboutMarkdownPath).then(response => { this.setState({about: response.data}); }); }
axios.post(`${baseURI}api/client/connection-test`, requestPayload).then((json = {}) => json.data)
axios .patch(`${baseURI}auth/users/${encodeURIComponent(username)}`, requestPayload) .then((json = {}) => json.data)
axios .get(`${baseURI}api/client/connection-test`) .then((json = {}) => json.data) .then( () => { AppDispatcher.dispatchServerAction({ type: ActionTypes.CLIENT_CONNECTION_TEST_SUCCESS, }); }, () => { AppDispatcher.dispatchServerAction({ type: ActionTypes.CLIENT_CONNECTION_TEST_ERROR, }); }, )
axios .put(`${baseURI}api/feed-monitor/feeds`, feed) .then((json = {}) => json.data) .then( data => { AppDispatcher.dispatchServerAction({ type: ActionTypes.SETTINGS_FEED_MONITOR_FEED_ADD_SUCCESS, data, }); }, error => { AppDispatcher.dispatchServerAction({ type: ActionTypes.SETTINGS_FEED_MONITOR_FEED_ADD_ERROR, error, }); }, )
axios .get(`${baseURI}api/client/settings`, {params: {property}}) .then((json = {}) => json.data) .then( data => { AppDispatcher.dispatchServerAction({ type: ActionTypes.CLIENT_SETTINGS_FETCH_REQUEST_SUCCESS, data, }); }, error => { AppDispatcher.dispatchServerAction({ type: ActionTypes.CLIENT_SETTINGS_FETCH_REQUEST_ERROR, error, }); }, )
axios .put(`${baseURI}api/feed-monitor/feeds/${id}`, feed) .then((json = {}) => json.data) .then( data => { AppDispatcher.dispatchServerAction({ type: ActionTypes.SETTINGS_FEED_MONITOR_FEED_MODIFY_SUCCESS, data, }); }, error => { AppDispatcher.dispatchServerAction({ type: ActionTypes.SETTINGS_FEED_MONITOR_FEED_MODiFY_ERROR, error, }); }, )
axios .get(`${baseURI}api/directory-list`, { params: options, }) .then((json = {}) => json.data) .then(response => { return { ...options, ...response, }; })
axios .get(`${baseURI}api/feed-monitor/feeds`, query) .then((json = {}) => json.data) .then( data => { AppDispatcher.dispatchServerAction({ type: ActionTypes.SETTINGS_FEED_MONITOR_FEEDS_FETCH_SUCCESS, data, }); }, error => { AppDispatcher.dispatchServerAction({ type: ActionTypes.SETTINGS_FEED_MONITOR_FEEDS_FETCH_ERROR, error, }); }, )
axios .get(`${baseURI}auth/users`) .then((json = {}) => json.data) .then(data => { AppDispatcher.dispatchServerAction({ type: ActionTypes.AUTH_LIST_USERS_SUCCESS, data, }); })
const getSlackPublicChannelList = (communityId: string, token: string) => { if (!token) return []; const decryptedToken = decryptString(token); return axios .get( `https://slack.com/api/channels.list?token=${decryptedToken}&exclude_archived=true&exclude_members=true` ) .then(response => { return handleSlackChannelResponse(response.data, communityId); }) .catch(error => { console.error('\n\nerror', error); return []; }); }