+ client: handle blocked services
This commit is contained in:
committed by
Simon Zolin
parent
3c684d1f85
commit
92cebd5b31
@@ -10,6 +10,7 @@ import encryption from './encryption';
|
||||
import clients from './clients';
|
||||
import access from './access';
|
||||
import rewrites from './rewrites';
|
||||
import services from './services';
|
||||
|
||||
const settings = handleActions({
|
||||
[actions.initSettingsRequest]: state => ({ ...state, processing: true }),
|
||||
@@ -424,6 +425,7 @@ export default combineReducers({
|
||||
clients,
|
||||
access,
|
||||
rewrites,
|
||||
services,
|
||||
loadingBar: loadingBarReducer,
|
||||
form: formReducer,
|
||||
});
|
||||
|
||||
29
client/src/reducers/services.js
Normal file
29
client/src/reducers/services.js
Normal file
@@ -0,0 +1,29 @@
|
||||
import { handleActions } from 'redux-actions';
|
||||
|
||||
import * as actions from '../actions/services';
|
||||
|
||||
const services = handleActions(
|
||||
{
|
||||
[actions.getBlockedServicesRequest]: state => ({ ...state, processing: true }),
|
||||
[actions.getBlockedServicesFailure]: state => ({ ...state, processing: false }),
|
||||
[actions.getBlockedServicesSuccess]: (state, { payload }) => ({
|
||||
...state,
|
||||
list: payload,
|
||||
processing: false,
|
||||
}),
|
||||
|
||||
[actions.setBlockedServicesRequest]: state => ({ ...state, processingSet: true }),
|
||||
[actions.setBlockedServicesFailure]: state => ({ ...state, processingSet: false }),
|
||||
[actions.setBlockedServicesSuccess]: state => ({
|
||||
...state,
|
||||
processingSet: false,
|
||||
}),
|
||||
},
|
||||
{
|
||||
processing: true,
|
||||
processingSet: false,
|
||||
list: [],
|
||||
},
|
||||
);
|
||||
|
||||
export default services;
|
||||
Reference in New Issue
Block a user