Skip to content

Commit

Permalink
Remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
teodorus-nathaniel committed Aug 16, 2023
1 parent 87bcff1 commit 5f0cb6e
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/pages/api/posts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,6 @@ export async function getPostsServer(postIds: string[]): Promise<PostData[]> {
return filteredPosts
}

async function addMetadataToPost(post: PostData) {
const link = post.content?.link
if (!link) return

const metadata = await getLinkMetadata(link)
if (metadata) post.content!.linkMetadata = metadata
}

const getMetadataRedisKey = (url: string) => 'metadata:' + url
const METADATA_MAX_AGE = 60 * 60 * 24 * 30 // 1 month
async function getLinkMetadata(link: string): Promise<LinkMetadata | null> {
Expand Down

0 comments on commit 5f0cb6e

Please sign in to comment.