Check for pictshare status ok.
This commit is contained in:
parent
6e6cfa9cf8
commit
76662ca557
1 changed files with 12 additions and 5 deletions
7
ui/src/components/post-listing.tsx
vendored
7
ui/src/components/post-listing.tsx
vendored
|
@ -818,12 +818,19 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
|||
)
|
||||
.then(res => res.json())
|
||||
.then(res => {
|
||||
if (res.status == 'ok') {
|
||||
let url = `${window.location.origin}/pictshare/${res.url}`;
|
||||
if (res.filetype == 'mp4') {
|
||||
url += '/raw';
|
||||
}
|
||||
this.state.thumbnail = url;
|
||||
this.setState(this.state);
|
||||
} else {
|
||||
console.error(
|
||||
`Couldn't cache pictshare url: ${this.state.iframely.thumbnail_url}`
|
||||
);
|
||||
console.error(res);
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue