fix lint error
All checks were successful
Build Docker Image Front / run (pull_request) Successful in 1m32s
Build Docker Image Back / run (pull_request) Successful in 23s
JsDocs / coverage (pull_request) Successful in 22s
Test and coverage / coverage (pull_request) Successful in 1m37s

This commit is contained in:
Clement 2024-05-20 23:22:30 +02:00
parent 7f6eac4102
commit 62b6a93bed

View File

@ -1,18 +1,18 @@
import { getRssString } from '@astrojs/rss';
import { getRssString } from '@astrojs/rss'
import { SITE, METADATA, APP_BLOG } from 'astrowind:config';
import { fetchPosts } from 'utils/blog';
import { getPermalink } from 'utils/permalinks';
import { SITE, METADATA, APP_BLOG } from 'astrowind:config'
import { fetchPosts } from 'utils/blog'
import { getPermalink } from 'utils/permalinks'
export const GET = async () => {
if (!APP_BLOG.isEnabled) {
return new Response(null, {
status: 404,
statusText: 'Not found',
});
})
}
const posts = await fetchPosts();
const posts = await fetchPosts()
const rss = await getRssString({
title: `${SITE.name}s Blog`,
@ -27,11 +27,11 @@ export const GET = async () => {
})),
trailingSlash: SITE.trailingSlash,
});
})
return new Response(rss, {
headers: {
'Content-Type': 'application/xml',
},
});
};
})
}