From a74c2248fb34f0914a3f0c9f6046b9ea362e25f1 Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Thu, 13 Dec 2018 14:39:59 +0300 Subject: [PATCH] Send dhcp/find_active_dhcp as POST request --- client/src/actions/index.js | 4 ++-- client/src/api/Api.js | 2 +- openapi/openapi.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/actions/index.js b/client/src/actions/index.js index e23ccb81..7e07c6a0 100644 --- a/client/src/actions/index.js +++ b/client/src/actions/index.js @@ -561,8 +561,8 @@ export const findActiveDhcpFailure = createAction('FIND_ACTIVE_DHCP_FAILURE'); export const findActiveDhcp = () => async (dispatch) => { dispatch(findActiveDhcpRequest()); try { - const result = await apiClient.findActiveDhcp(); - dispatch(findActiveDhcpSuccess(result)); + await apiClient.findActiveDhcp(); + dispatch(findActiveDhcpSuccess()); } catch (error) { dispatch(addErrorToast({ error })); dispatch(findActiveDhcpFailure()); diff --git a/client/src/api/Api.js b/client/src/api/Api.js index f7b363e9..4aac23f5 100644 --- a/client/src/api/Api.js +++ b/client/src/api/Api.js @@ -306,7 +306,7 @@ export default class Api { // DHCP DHCP_STATUS = { path: 'dhcp/status', method: 'GET' }; DHCP_SET_CONFIG = { path: 'dhcp/set_config', method: 'POST' }; - DHCP_FIND_ACTIVE = { path: 'dhcp/find_active_dhcp', method: 'GET' }; + DHCP_FIND_ACTIVE = { path: 'dhcp/find_active_dhcp', method: 'POST' }; getDhcpStatus() { const { path, method } = this.DHCP_STATUS; diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index c491d7af..97b94c99 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -303,7 +303,7 @@ paths: description: OK /dhcp/find_active_dhcp: - get: + post: tags: - dhcp operationId: checkActiveDhcp