update sync/set response handling
This commit is contained in:
parent
5c19e56aa8
commit
8145575e25
3 changed files with 6 additions and 6 deletions
4
dist/bundle.es.js
vendored
4
dist/bundle.es.js
vendored
|
@ -1984,11 +1984,11 @@ function doSetSync(oldHash, newHash, data) {
|
|||
new_hash: newHash,
|
||||
data
|
||||
}, 'post').then(response => {
|
||||
if (!response.success) {
|
||||
if (!response.hash) {
|
||||
return dispatch({
|
||||
type: SET_SYNC_FAILED,
|
||||
data: {
|
||||
error: response.error
|
||||
error: 'No hash returned for sync/set.'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
4
dist/bundle.js
vendored
4
dist/bundle.js
vendored
|
@ -3411,11 +3411,11 @@ function doSetSync(oldHash, newHash, data) {
|
|||
new_hash: newHash,
|
||||
data: data
|
||||
}, 'post').then(function (response) {
|
||||
if (!response.success) {
|
||||
if (!response.hash) {
|
||||
return dispatch({
|
||||
type: constants_action_types__WEBPACK_IMPORTED_MODULE_0__["SET_SYNC_FAILED"],
|
||||
data: {
|
||||
error: response.error
|
||||
error: 'No hash returned for sync/set.'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -10,10 +10,10 @@ export function doSetSync(oldHash, newHash, data) {
|
|||
|
||||
Lbryio.call('sync', 'set', { old_hash: oldHash, new_hash: newHash, data }, 'post')
|
||||
.then(response => {
|
||||
if (!response.success) {
|
||||
if (!response.hash) {
|
||||
return dispatch({
|
||||
type: ACTIONS.SET_SYNC_FAILED,
|
||||
data: { error: response.error },
|
||||
data: { error: 'No hash returned for sync/set.' },
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue