From 62b6a93bedf716ebb28a499c884bd7587a329e66 Mon Sep 17 00:00:00 2001 From: Clement Date: Mon, 20 May 2024 23:22:30 +0200 Subject: [PATCH] fix lint error --- front/src/pages/rss.xml.ts | 58 +++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/front/src/pages/rss.xml.ts b/front/src/pages/rss.xml.ts index c40200b..3b671c5 100644 --- a/front/src/pages/rss.xml.ts +++ b/front/src/pages/rss.xml.ts @@ -1,37 +1,37 @@ -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', - }); - } + 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`, - description: METADATA?.description || '', - site: import.meta.env.SITE, + const rss = await getRssString({ + title: `${SITE.name}’s Blog`, + description: METADATA?.description || '', + site: import.meta.env.SITE, - items: posts.map((post) => ({ - link: getPermalink(post.permalink, 'post'), - title: post.title, - description: post.excerpt, - pubDate: post.publishDate, - })), + items: posts.map((post) => ({ + link: getPermalink(post.permalink, 'post'), + title: post.title, + description: post.excerpt, + pubDate: post.publishDate, + })), - trailingSlash: SITE.trailingSlash, - }); + trailingSlash: SITE.trailingSlash, + }) - return new Response(rss, { - headers: { - 'Content-Type': 'application/xml', - }, - }); -}; + return new Response(rss, { + headers: { + 'Content-Type': 'application/xml', + }, + }) +}