Commit a793cfa8 authored by Yannis Barlas's avatar Yannis Barlas

fix undefined response from action

parent a0a91af5
......@@ -10,7 +10,7 @@ function htmlToEpubRequest() {
function htmlToEpubSuccess(extractedEpubPath) {
return {
type: T.HTML_TO_EPUB_CONV_SUCCESS,
extractedEpubPath
extractedEpubPath: extractedEpubPath
}
}
......@@ -33,9 +33,7 @@ export function htmlToEpub(bookId) {
`/api/collections/${bookId}/epub?destination=folder`,
opts
).then(
res => {
dispatch(htmlToEpubSuccess(res.path))
},
res => res.json().then(data => dispatch(htmlToEpubSuccess(data.path))),
err => dispatch(htmlToEpubFailure(err))
)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment