Move remaining actions over to use redux and v4 endpoints (#6720)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
fe7e9d95b3
Коммит
23ccfc845c
@@ -3,8 +3,6 @@
|
||||
|
||||
import {clientLogout} from 'actions/global_actions.jsx';
|
||||
|
||||
import Client from 'client/web_client.jsx';
|
||||
|
||||
import store from 'stores/redux_store.jsx';
|
||||
const dispatch = store.dispatch;
|
||||
const getState = store.getState;
|
||||
@@ -267,31 +265,26 @@ export function uploadBrandImage(brandImage, success, error) {
|
||||
}
|
||||
|
||||
export function uploadLicenseFile(file, success, error) {
|
||||
Client.uploadLicenseFile(
|
||||
file,
|
||||
() => {
|
||||
if (success) {
|
||||
success();
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
if (error) {
|
||||
error(err);
|
||||
AdminActions.uploadLicense(file)(dispatch, getState).then(
|
||||
(data) => {
|
||||
if (data && success) {
|
||||
success(data);
|
||||
} else if (data == null && error) {
|
||||
const serverError = getState().requests.admin.uploadLicense.error;
|
||||
error({id: serverError.server_error_id, ...serverError});
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export function removeLicenseFile(success, error) {
|
||||
Client.removeLicenseFile(
|
||||
() => {
|
||||
if (success) {
|
||||
success();
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
if (error) {
|
||||
error(err);
|
||||
AdminActions.removeLicense()(dispatch, getState).then(
|
||||
(data) => {
|
||||
if (data && success) {
|
||||
success(data);
|
||||
} else if (data == null && error) {
|
||||
const serverError = getState().requests.admin.removeLicense.error;
|
||||
error({id: serverError.server_error_id, ...serverError});
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -374,3 +367,19 @@ export function removeIdpSamlCertificate(success, error) {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export function getStandardAnalytics(teamId) {
|
||||
AdminActions.getStandardAnalytics(teamId)(dispatch, getState);
|
||||
}
|
||||
|
||||
export function getAdvancedAnalytics(teamId) {
|
||||
AdminActions.getAdvancedAnalytics(teamId)(dispatch, getState);
|
||||
}
|
||||
|
||||
export function getPostsPerDayAnalytics(teamId) {
|
||||
AdminActions.getPostsPerDayAnalytics(teamId)(dispatch, getState);
|
||||
}
|
||||
|
||||
export function getUsersPerDayAnalytics(teamId) {
|
||||
AdminActions.getUsersPerDayAnalytics(teamId)(dispatch, getState);
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user