feat: 章节软删除、对话左滑删除,移除已读状态
- 章节:详情页增加删除按钮,软删除(is_active=False),AI 不再修改但保留供参考 - 章节:get_chapter 增加 is_active 校验,已删除章节返回 404 - 章节:AI 生成时参考同类别已删除章节摘要 - 对话:左滑显示删除,调用 hard delete API,删除前二次确认 - 对话:根布局包裹 GestureHandlerRootView 以支持 Swipeable - 对话:移除已读/未读状态展示及相关 i18n
This commit is contained in:
@@ -170,6 +170,8 @@ class MemoirService:
|
||||
raise HTTPException(status_code=404, detail="Chapter not found")
|
||||
if chapter.user_id != user_id:
|
||||
raise HTTPException(status_code=403, detail="无权访问此章节")
|
||||
if not chapter.is_active:
|
||||
raise HTTPException(status_code=404, detail="Chapter not found")
|
||||
await self._cleanup_unavailable_images(chapter)
|
||||
return chapter_to_dict(chapter)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user