浏览代码

fix(conversation-service): return success response after conversation… (#10416)

tags/0.11.1
Benjamin 11 个月前
父节点
当前提交
a5558f8fcc
没有帐户链接到提交者的电子邮件
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. 1
    2
      api/controllers/service_api/app/conversation.py
  2. 3
    0
      api/services/conversation_service.py

+ 1
- 2
api/controllers/service_api/app/conversation.py 查看文件

@@ -58,10 +58,9 @@ class ConversationDetailApi(Resource):
conversation_id = str(c_id)

try:
ConversationService.delete(app_model, conversation_id, end_user)
return ConversationService.delete(app_model, conversation_id, end_user)
except services.errors.conversation.ConversationNotExistsError:
raise NotFound("Conversation Not Exists.")
return {"result": "success"}, 200


class ConversationRenameApi(Resource):

+ 3
- 0
api/services/conversation_service.py 查看文件

@@ -160,4 +160,7 @@ class ConversationService:
conversation = cls.get_conversation(app_model, conversation_id, user)

conversation.is_deleted = True
conversation.updated_at = datetime.now(timezone.utc).replace(tzinfo=None)
db.session.commit()

return {"result": "success"}, 200

正在加载...
取消
保存