mirror of
https://dev.azure.com/tstanciu94/ReverseProxy/_git/ReverseProxy_Frontend
synced 2025-08-05 17:22:36 +03:00
28 lines
669 B
JavaScript
28 lines
669 B
JavaScript
import * as types from "./actionTypes";
|
|
import initialState from "../../redux/reducers/initialState";
|
|
|
|
export default function serverReducer(state = initialState.server, action) {
|
|
switch (action.type) {
|
|
case types.LOAD_SERVER_DATA_SUCCESS:
|
|
return {
|
|
...state,
|
|
data: { ...action.payload, loading: false, loaded: true }
|
|
};
|
|
|
|
case types.LOAD_SYSTEM_VERSION_SUCCESS:
|
|
return {
|
|
...state,
|
|
...action.payload
|
|
};
|
|
|
|
case types.LOAD_ACTIVE_SESSION_SUCCESS:
|
|
return {
|
|
...state,
|
|
activeSession: { ...action.payload, loading: false, loaded: true }
|
|
};
|
|
|
|
default:
|
|
return state;
|
|
}
|
|
}
|