Skip to content

Commit

Permalink
Fix last build date in feed temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallku committed Feb 19, 2024
1 parent 41242bc commit 8658dde
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion apps/blog/app/[category]/feed/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export async function GET(_: Request, { params }: { params: { category: string }
});

const posts = getPosts();
const lastBuildDate = new Date(posts[0].data.date.modified || posts[0].data.date.posted).toUTCString();
// FIXME: Should calculate it in build time
const lastBuildDate = new Date().toUTCString();
const categories = getCategories();
const host = "https://marshallku.com";
const formattedPosts = await Promise.all(
Expand Down
3 changes: 2 additions & 1 deletion apps/blog/app/feed/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export async function GET() {
});

const posts = getPosts();
const lastBuildDate = new Date(posts[0].data.date.modified || posts[0].data.date.posted).toUTCString();
// FIXME: SHould calculate it in build time
const lastBuildDate = new Date().toUTCString();
const categories = getCategories();
const host = "https://marshallku.com";
const formattedPosts = await Promise.all(
Expand Down

0 comments on commit 8658dde

Please sign in to comment.