fix(route/patreon): fix feed title and description (#20351)
This commit is contained in:
parent
6e454df057
commit
43e8b3ef83
|
|
@ -48,7 +48,6 @@ async function handler(ctx) {
|
|||
const bootstrapEnvelope = nextData.props.pageProps.bootstrapEnvelope;
|
||||
|
||||
return {
|
||||
meta: bootstrapEnvelope.meta,
|
||||
id: bootstrapEnvelope.pageBootstrap.campaign.data.id,
|
||||
attributes: bootstrapEnvelope.pageBootstrap.campaign.data.attributes,
|
||||
};
|
||||
|
|
@ -114,8 +113,8 @@ async function handler(ctx) {
|
|||
});
|
||||
|
||||
return {
|
||||
title: creatorData.meta.title,
|
||||
description: creatorData.meta.desc,
|
||||
title: creatorData.attributes.name,
|
||||
description: creatorData.attributes.creation_name,
|
||||
link,
|
||||
image: creatorData.attributes.avatar_photo_url,
|
||||
item: items,
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
</audio><br>
|
||||
|
||||
{{ else if attributes.post_type === 'video_embed' || attributes.post_type === 'link' }}
|
||||
<img src="{{ attributes.image.url }}"><br>
|
||||
<img src="{{ attributes.image?.url || attributes.meta_image_url }}"><br>
|
||||
|
||||
{{ else if attributes.post_type === 'text_only' }}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,27 +1,27 @@
|
|||
export interface CreatorData {
|
||||
meta: {
|
||||
desc: string;
|
||||
height: null;
|
||||
// desc: string;
|
||||
// height: null;
|
||||
imageUrl: string;
|
||||
isPrivate: boolean;
|
||||
key: string;
|
||||
openGraph: OpenGraph;
|
||||
title: string;
|
||||
// key: string;
|
||||
// openGraph: OpenGraph;
|
||||
// title: string;
|
||||
url: string;
|
||||
videoHeight: null;
|
||||
videoUrl: null;
|
||||
// videoUrl: null;
|
||||
videoWidth: null;
|
||||
viewport: string;
|
||||
// viewport: string;
|
||||
};
|
||||
id: string;
|
||||
attributes: IncludedAttributes;
|
||||
}
|
||||
|
||||
interface OpenGraph {
|
||||
desc: null;
|
||||
imageUrl: null;
|
||||
title: null;
|
||||
}
|
||||
// interface OpenGraph {
|
||||
// desc: null;
|
||||
// imageUrl: null;
|
||||
// title: null;
|
||||
// }
|
||||
|
||||
export interface PostData {
|
||||
data: Datum[];
|
||||
|
|
@ -275,6 +275,7 @@ interface IncludedAttributes {
|
|||
is_monthly?: boolean;
|
||||
is_nsfw?: boolean;
|
||||
name?: string;
|
||||
creation_name?: string;
|
||||
show_audio_post_download_links?: boolean;
|
||||
url?: string;
|
||||
// Additional properties for other types
|
||||
|
|
|
|||
Loading…
Reference in New Issue