use spee.ch publish config endpoint for thumbnail status #1685
1 changed files with 10 additions and 6 deletions
|
@ -43,17 +43,22 @@ export const doResetThumbnailStatus = () => (dispatch: Dispatch): PromiseAction
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
return fetch('https://spee.ch/api/channel/availability/@testing')
|
return fetch('https://spee.ch/api/config/site/publishing')
|
||||||
.then(() =>
|
.then(res => res.json())
|
||||||
dispatch({
|
.then(status => {
|
||||||
|
if (status.disabled) {
|
||||||
|
throw Error();
|
||||||
|
}
|
||||||
|
|
||||||
|
return dispatch({
|
||||||
type: ACTIONS.UPDATE_PUBLISH_FORM,
|
type: ACTIONS.UPDATE_PUBLISH_FORM,
|
||||||
data: {
|
data: {
|
||||||
uploadThumbnailStatus: THUMBNAIL_STATUSES.READY,
|
uploadThumbnailStatus: THUMBNAIL_STATUSES.READY,
|
||||||
thumbnail: '',
|
thumbnail: '',
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
},
|
},
|
||||||
})
|
});
|
||||||
)
|
})
|
||||||
.catch(() =>
|
.catch(() =>
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.UPDATE_PUBLISH_FORM,
|
type: ACTIONS.UPDATE_PUBLISH_FORM,
|
||||||
|
@ -188,7 +193,6 @@ export const doPublish = (params: PublishParams) => (dispatch: Dispatch, getStat
|
||||||
price,
|
price,
|
||||||
uri,
|
uri,
|
||||||
sources,
|
sources,
|
||||||
isStillEditing,
|
|
||||||
} = params;
|
} = params;
|
||||||
|
|
||||||
// get the claim id from the channel name, we will use that instead
|
// get the claim id from the channel name, we will use that instead
|
||||||
|
|
Loading…
Reference in a new issue