Skip to content

Commit 17246d0

Browse files
authored
Merge pull request #322 from avinxshKD/fix/library-serveraction-helper
refactor: use serverAction helper in library() method
2 parents ffc136f + 5809e1b commit 17246d0

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

src/graph-builder/graph-core/6-server.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -223,21 +223,9 @@ class GraphServer extends GraphLoadSave {
223223
}
224224

225225
library(fileName) {
226-
const toastId = toast.info('LOADING.......', {
227-
position: 'bottom-left',
228-
autoClose: false,
229-
});
230-
// this.dispatcher({ type: T.SET_LOGS, payload: false });
231226
const url = `${EXECUTION_ENGINE_URL}/library/${this.superState.uploadedDirName}`
232227
+ `?filename=${fileName}&path=${this.superState.library}`;
233-
Axios.post(url)
234-
.then((res) => { // eslint-disable-next-line
235-
toast.info(res.data['message'])
236-
toast.dismiss(toastId);
237-
}).catch((err) => { // eslint-disable-next-line
238-
toast.error(err.response?.data?.message || err.message);
239-
toast.dismiss(toastId);
240-
});
228+
this.serverAction('post', url, null);
241229
}
242230

243231
setCurStatus() {

0 commit comments

Comments
 (0)