mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Finished removing some of the last bits of client side config
This commit is contained in:
@@ -40,7 +40,6 @@ var Constants = require('../utils/constants.jsx');
|
|||||||
var ActionTypes = Constants.ActionTypes;
|
var ActionTypes = Constants.ActionTypes;
|
||||||
|
|
||||||
function setupChannelPage(props) {
|
function setupChannelPage(props) {
|
||||||
AsyncClient.getConfig();
|
|
||||||
|
|
||||||
AppDispatcher.handleViewAction({
|
AppDispatcher.handleViewAction({
|
||||||
type: ActionTypes.CLICK_CHANNEL,
|
type: ActionTypes.CLICK_CHANNEL,
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ var SignupTeam = require('../components/signup_team.jsx');
|
|||||||
var AsyncClient = require('../utils/async_client.jsx');
|
var AsyncClient = require('../utils/async_client.jsx');
|
||||||
|
|
||||||
function setupSignupTeamPage(props) {
|
function setupSignupTeamPage(props) {
|
||||||
AsyncClient.getConfig();
|
|
||||||
|
|
||||||
var services = JSON.parse(props.AuthServices);
|
var services = JSON.parse(props.AuthServices);
|
||||||
|
|
||||||
|
|||||||
@@ -583,27 +583,3 @@ export function getMyTeam() {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getConfig() {
|
|
||||||
if (isCallInProgress('getConfig')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
callTracker.getConfig = utils.getTimestamp();
|
|
||||||
client.getConfig(
|
|
||||||
function getConfigSuccess(data, textStatus, xhr) {
|
|
||||||
callTracker.getConfig = 0;
|
|
||||||
|
|
||||||
if (data && xhr.status !== 304) {
|
|
||||||
AppDispatcher.handleServerAction({
|
|
||||||
type: ActionTypes.RECIEVED_CONFIG,
|
|
||||||
settings: data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
function getConfigFailure(err) {
|
|
||||||
callTracker.getConfig = 0;
|
|
||||||
dispatchError(err, 'getConfig');
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -987,17 +987,3 @@ export function updateValetFeature(data, success, error) {
|
|||||||
|
|
||||||
track('api', 'api_teams_update_valet_feature');
|
track('api', 'api_teams_update_valet_feature');
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getConfig(success, error) {
|
|
||||||
$.ajax({
|
|
||||||
url: '/api/v1/config/get_all',
|
|
||||||
dataType: 'json',
|
|
||||||
type: 'GET',
|
|
||||||
ifModified: true,
|
|
||||||
success: success,
|
|
||||||
error: function onError(xhr, status, err) {
|
|
||||||
var e = handleError('getConfig', xhr, status, err);
|
|
||||||
error(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user