Feature/extract import all (#2796)

* use existing route to get all chatflows

* add export all chatflows functionality

* add read exported all chatflows json file functionality

* add save chatflows functionality in server

* chore rename saveChatflows to importChatflows and others

* chore rewrite snackbar message

* fix import chatflows when no data in chatflows db

* add handle when import file array length is 0

* chore update and add meaning comment in importChatflows

* update method of storing flowdata for importChatflows function

* Refresh/redirect to chatflows when import is successful

* fix lint

---------

Co-authored-by: Ilango <rajagopalilango@gmail.com>
This commit is contained in:
Ong Chung Yau
2024-07-16 09:47:41 +08:00
committed by GitHub
parent 074bb738a3
commit 95b2cf7b7f
7 changed files with 254 additions and 30 deletions
+3
View File
@@ -10,6 +10,8 @@ const getSpecificChatflowFromPublicEndpoint = (id) => client.get(`/public-chatfl
const createNewChatflow = (body) => client.post(`/chatflows`, body)
const importChatflows = (body) => client.post(`/chatflows/importchatflows`, body)
const updateChatflow = (id, body) => client.put(`/chatflows/${id}`, body)
const deleteChatflow = (id) => client.delete(`/chatflows/${id}`)
@@ -24,6 +26,7 @@ export default {
getSpecificChatflow,
getSpecificChatflowFromPublicEndpoint,
createNewChatflow,
importChatflows,
updateChatflow,
deleteChatflow,
getIsChatflowStreaming,