feat(review): add soft delete button to remove posts from admin channel while preserving deduplication state
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user