diff --git a/src/components/ZclCreateModifyEndpoint.vue b/src/components/ZclCreateModifyEndpoint.vue index 04159d1c4a..2553c077fb 100644 --- a/src/components/ZclCreateModifyEndpoint.vue +++ b/src/components/ZclCreateModifyEndpoint.vue @@ -544,9 +544,11 @@ export default { } }, getEndpointIds() { - this.$store.dispatch('zap/getEndpointIds').then((res) => { - this.endpointIds = res.data - }) + if (this.$serverGet != null) { + this.$serverGet(RestApi.uri.endpointIds).then((resp) => { + this.endpointIds = resp.data + }) + } }, // This function will close the endpoint modal toggleCreateEndpointModal() { diff --git a/src/store/zap/actions.js b/src/store/zap/actions.js index c7c714663f..be65481928 100644 --- a/src/store/zap/actions.js +++ b/src/store/zap/actions.js @@ -513,14 +513,6 @@ export function addEndpoint(context, newEndpointContext) { }) } -/** - * Get endpoint ids. - * @returns endpoints ids - */ -export async function getEndpointIds() { - return await axiosRequests.$serverGet(restApi.uri.endpointIds) -} - /** * Add endpoint type for ZAP UI. * @param {*} context