aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/ducks
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/js/ducks')
-rw-r--r--web/src/js/ducks/flows.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/web/src/js/ducks/flows.js b/web/src/js/ducks/flows.js
index 1dc88c67..3dd21016 100644
--- a/web/src/js/ducks/flows.js
+++ b/web/src/js/ducks/flows.js
@@ -117,13 +117,12 @@ export function update(flow, data) {
return { type: REQUEST_ACTION }
}
-export function update_content(flow, file) {
+export function updateContent(flow, file, type) {
const body = new FormData()
if (typeof file !== File)
file = new Blob([file], {type: 'plain/text'})
body.append('file', file)
- fetchApi(`/flows/${flow.id}/response/content`, {method: 'post', body} )
- update(flow, {response: {headers: [['Content-Encoding', '']]} } )
+ fetchApi(`/flows/${flow.id}/${type}/content`, {method: 'post', body} )
return { type: REQUEST_ACTION }
}