PLT-6451 Migrate installed_oauth_app.jsx to be pure and use Redux (#7190)
* Migrate installed_oauth_app.jsx to be pure and use Redux, add test * Fix behavior for the error case
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
6df51f8617
Коммит
13d76a0cb2
@@ -9,7 +9,6 @@ const getState = store.getState;
|
||||
|
||||
import * as AdminActions from 'mattermost-redux/actions/admin';
|
||||
import * as UserActions from 'mattermost-redux/actions/users';
|
||||
import * as IntegrationActions from 'mattermost-redux/actions/integrations';
|
||||
import {Client4} from 'mattermost-redux/client';
|
||||
|
||||
export function saveConfig(config, success, error) {
|
||||
@@ -238,19 +237,6 @@ export function oauthToEmail(currentService, email, password, success, error) {
|
||||
);
|
||||
}
|
||||
|
||||
export function regenerateOAuthAppSecret(oauthAppId, success, error) {
|
||||
IntegrationActions.regenOAuthAppSecret(oauthAppId)(dispatch, getState).then(
|
||||
(data) => {
|
||||
if (data && success) {
|
||||
success(data);
|
||||
} else if (data == null && error) {
|
||||
const serverError = getState().requests.admin.updateOAuthApp.error;
|
||||
error({id: serverError.server_error_id, ...serverError});
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export function uploadBrandImage(brandImage, success, error) {
|
||||
AdminActions.uploadBrandImage(brandImage)(dispatch, getState).then(
|
||||
(data) => {
|
||||
|
||||
Ссылка в новой задаче
Block a user