+ client: added name for client

This commit is contained in:
Ildar Kamalov
2019-03-20 17:04:32 +03:00
committed by Simon Zolin
parent 5210d214ec
commit bc0b0af06b
8 changed files with 86 additions and 8 deletions

View File

@@ -665,3 +665,18 @@ export const toggleDhcp = config => async (dispatch) => {
}
}
};
export const getClientsRequest = createAction('GET_CLIENTS_REQUEST');
export const getClientsFailure = createAction('GET_CLIENTS_FAILURE');
export const getClientsSuccess = createAction('GET_CLIENTS_SUCCESS');
export const getClients = () => async (dispatch) => {
dispatch(getClientsRequest());
try {
const clients = await apiClient.getGlobalClients();
dispatch(getClientsSuccess(clients));
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(getClientsFailure());
}
};