Update thumbnail paths (#1747)

This commit is contained in:
Rave | 図書館猫 2022-06-23 22:33:32 +02:00 committed by GitHub
parent 553a801bc3
commit 305673999b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 27 deletions

View file

@ -1,5 +1,4 @@
export const IMG_CDN_PUBLISH_URL = 'https://thumbs.odycdn.com/upload.php'; export const IMG_CDN_PUBLISH_URL = 'https://thumbs.odycdn.com/upload';
export const IMG_CDN_STATUS_URL = 'https://thumbs.odycdn.com/status.php';
export const JSON_RESPONSE_KEYS = Object.freeze({ export const JSON_RESPONSE_KEYS = Object.freeze({
STATUS: 'type', STATUS: 'type',

View file

@ -20,7 +20,7 @@ import { push } from 'connected-react-router';
import analytics from 'analytics'; import analytics from 'analytics';
import { doOpenModal } from 'redux/actions/app'; import { doOpenModal } from 'redux/actions/app';
import { CC_LICENSES, COPYRIGHT, OTHER, NONE, PUBLIC_DOMAIN } from 'constants/licenses'; import { CC_LICENSES, COPYRIGHT, OTHER, NONE, PUBLIC_DOMAIN } from 'constants/licenses';
import { IMG_CDN_PUBLISH_URL, IMG_CDN_STATUS_URL } from 'constants/cdn_urls'; import { IMG_CDN_PUBLISH_URL } from 'constants/cdn_urls';
import * as THUMBNAIL_STATUSES from 'constants/thumbnail_upload_statuses'; import * as THUMBNAIL_STATUSES from 'constants/thumbnail_upload_statuses';
import { creditsToString } from 'util/format-credits'; import { creditsToString } from 'util/format-credits';
import Lbry from 'lbry'; import Lbry from 'lbry';
@ -381,13 +381,6 @@ export const doResetThumbnailStatus = () => (dispatch: Dispatch) => {
}, },
}); });
return fetch(IMG_CDN_STATUS_URL)
.then((res) => res.json())
.then((json) => {
if (json.status !== 'online') {
throw Error();
}
return dispatch({ return dispatch({
type: ACTIONS.UPDATE_PUBLISH_FORM, type: ACTIONS.UPDATE_PUBLISH_FORM,
data: { data: {
@ -395,16 +388,6 @@ export const doResetThumbnailStatus = () => (dispatch: Dispatch) => {
thumbnail: '', thumbnail: '',
}, },
}); });
})
.catch(() =>
dispatch({
type: ACTIONS.UPDATE_PUBLISH_FORM,
data: {
uploadThumbnailStatus: THUMBNAIL_STATUSES.API_DOWN,
thumbnail: '',
},
})
);
}; };
export const doBeginPublish = (name: string) => (dispatch: Dispatch) => { export const doBeginPublish = (name: string) => (dispatch: Dispatch) => {