From 5809e1bf596737cc1d30873949a2be787db6c8a2 Mon Sep 17 00:00:00 2001 From: Avinash Kumar Deepak Date: Thu, 19 Feb 2026 22:23:47 +0530 Subject: [PATCH] refactor: use serverAction helper in library() method --- src/graph-builder/graph-core/6-server.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/graph-builder/graph-core/6-server.js b/src/graph-builder/graph-core/6-server.js index fd19b11..632fdd6 100644 --- a/src/graph-builder/graph-core/6-server.js +++ b/src/graph-builder/graph-core/6-server.js @@ -223,21 +223,9 @@ class GraphServer extends GraphLoadSave { } library(fileName) { - const toastId = toast.info('LOADING.......', { - position: 'bottom-left', - autoClose: false, - }); - // this.dispatcher({ type: T.SET_LOGS, payload: false }); const url = `${EXECUTION_ENGINE_URL}/library/${this.superState.uploadedDirName}` + `?filename=${fileName}&path=${this.superState.library}`; - Axios.post(url) - .then((res) => { // eslint-disable-next-line - toast.info(res.data['message']) - toast.dismiss(toastId); - }).catch((err) => { // eslint-disable-next-line - toast.error(err.response?.data?.message || err.message); - toast.dismiss(toastId); - }); + this.serverAction('post', url, null); } setCurStatus() {