Fix repost state drift and document workflow

This commit is contained in:
cyph3rasi
2026-03-07 19:47:49 -08:00
parent 76ca21e14f
commit 17baf8e4f0
12 changed files with 256 additions and 23 deletions
+2 -1
View File
@@ -67,7 +67,8 @@ export async function GET(request: Request, context: RouteContext) {
const viewerReposts = await db.query.posts.findMany({
where: and(
eq(posts.userId, viewer.id),
inArray(posts.repostOfId, postIds)
inArray(posts.repostOfId, postIds),
eq(posts.isRemoved, false)
),
});
const repostedPostIds = new Set(viewerReposts.map(r => r.repostOfId));
+2 -1
View File
@@ -177,7 +177,8 @@ export async function GET(request: Request, context: RouteContext) {
const viewerReposts = await db.query.posts.findMany({
where: and(
eq(posts.userId, viewer.id),
inArray(posts.repostOfId, postIds)
inArray(posts.repostOfId, postIds),
eq(posts.isRemoved, false)
),
});
const repostedPostIds = new Set(viewerReposts.map(r => r.repostOfId));