feat: validate intentional post requests

This commit is contained in:
2026-07-13 10:21:27 +09:00
parent 92fbcd2242
commit 5873728c30
5 changed files with 185 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
import type { Post, PostPage } from './types'
export function flattenPostPages(pages: PostPage[]): Post[] {
const seen = new Set<string>()
return pages.flatMap(({ tweets }) =>
tweets.filter(({ id }) => {
if (seen.has(id)) return false
seen.add(id)
return true
}),
)
}