MCPcopy
hub / github.com/FlowiseAI/Flowise / sanitizeCustomTemplate

Function sanitizeCustomTemplate

packages/ui/src/utils/exportImport.js:69–77  ·  view source on GitHub ↗
(CustomTemplate)

Source from the content-addressed store, hash-verified

67}
68
69const sanitizeCustomTemplate = (CustomTemplate) => {
70 try {
71 return CustomTemplate.map((customTemplate) => {
72 return { ...customTemplate, usecases: JSON.stringify(customTemplate.usecases), workspaceId: undefined }
73 })
74 } catch (error) {
75 throw new Error(`exportImport.sanitizeCustomTemplate ${getErrorMessage(error)}`)
76 }
77}
78
79const sanitizeDocumentStore = (DocumentStore) => {
80 try {

Callers 1

exportDataFunction · 0.85

Calls 2

getErrorMessageFunction · 0.90
stringifyMethod · 0.80

Tested by

no test coverage detected