fix: 添加删除帖子的 mock handler

- 支持 DELETE /api/posts/:postId 请求
- 从内存存储中正确删除评论
- 修复 mock 模式下删除评论失败的问题

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
zdl
2025-12-15 14:08:14 +08:00
parent 24b8b930c8
commit 62d3cb7527
3 changed files with 4 additions and 2 deletions

1
app.py
View File

@@ -10990,6 +10990,7 @@ def create_event_post(event_id):
'created_at': post.created_at.isoformat(),
'user': {
'id': current_user.id,
'nickname': current_user.nickname, # 添加昵称,与导航区保持一致
'username': current_user.username,
'avatar_url': current_user.avatar_url
}