feat(review): add soft delete button to remove posts from admin channel while preserving deduplication state

This commit is contained in:
mamad
2026-08-27 22:15:43 +03:30
parent 26cd91a48f
commit e66ed361c3
4 changed files with 26 additions and 5 deletions
+5
View File
@@ -209,3 +209,8 @@ class Repository:
pool = await self._get_pool()
async with pool.acquire() as conn:
await conn.execute("UPDATE posts SET status = 'rejected' WHERE id = $1;", post_id)
async def soft_delete_post(self, post_id: int) -> None:
pool = await self._get_pool()
async with pool.acquire() as conn:
await conn.execute("UPDATE posts SET is_deleted = TRUE, status = 'deleted' WHERE id = $1;", post_id)