Update imports
This commit is contained in:
parent
130f5c51e6
commit
534348b7a8
@ -6,7 +6,7 @@ import {
|
|||||||
META_TITLE,
|
META_TITLE,
|
||||||
PUBLIC_FEED_ENABLED,
|
PUBLIC_FEED_ENABLED,
|
||||||
} from '@/app/config';
|
} from '@/app/config';
|
||||||
import { feedPhotoToXml, formatPhotoForFeed } from '@/app/feed';
|
import { feedPhotoToXml, formatPhotoForFeedRss } from '@/app/feed';
|
||||||
|
|
||||||
export const dynamic = 'force-static';
|
export const dynamic = 'force-static';
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ export async function GET() {
|
|||||||
limit: INFINITE_SCROLL_FEED_INITIAL,
|
limit: INFINITE_SCROLL_FEED_INITIAL,
|
||||||
sortBy: 'createdAt',
|
sortBy: 'createdAt',
|
||||||
});
|
});
|
||||||
const items = photos.map(formatPhotoForFeed).map(feedPhotoToXml);
|
const items = photos.map(formatPhotoForFeedRss).map(feedPhotoToXml);
|
||||||
|
|
||||||
return new Response(
|
return new Response(
|
||||||
`<?xml version="1.0" encoding="UTF-8"?>
|
`<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|||||||
@ -117,9 +117,9 @@ export const feedPhotoToXml = (photo: PublicFeedPhotoRss): string => {
|
|||||||
medium="image"
|
medium="image"
|
||||||
width="${photo.media.content.width}"
|
width="${photo.media.content.width}"
|
||||||
height="${photo.media.content.height}">
|
height="${photo.media.content.height}">
|
||||||
<media:thumbnail url="${photo.media.thumb.url.replace(/&/g, '&')}"
|
<media:thumbnail url="${photo.media.thumb.url.replace(/&/g, '&')}"
|
||||||
width="${photo.media.thumb.width}"
|
width="${photo.media.thumb.width}"
|
||||||
height="${photo.media.thumb.height}" />
|
height="${photo.media.thumb.height}" />
|
||||||
</media:content>
|
</media:content>
|
||||||
</item>`;
|
</item>`;
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user