mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 17:08:03 +08:00
add delete comment and reply
This commit is contained in:
@ -118,7 +118,7 @@ class WorkflowCommentDetailApi(Resource):
|
||||
user_id=current_user.id,
|
||||
)
|
||||
|
||||
return {"message": "Comment deleted successfully"}, 200
|
||||
return {"result": "success"}, 204
|
||||
|
||||
|
||||
class WorkflowCommentResolveApi(Resource):
|
||||
@ -140,22 +140,6 @@ class WorkflowCommentResolveApi(Resource):
|
||||
|
||||
return comment
|
||||
|
||||
@login_required
|
||||
@setup_required
|
||||
@account_initialization_required
|
||||
@get_app_model
|
||||
@marshal_with(workflow_comment_resolve_fields)
|
||||
def delete(self, app_model: App, comment_id: str):
|
||||
"""Reopen a resolved workflow comment."""
|
||||
comment = WorkflowCommentService.reopen_comment(
|
||||
tenant_id=current_user.current_tenant_id,
|
||||
app_id=app_model.id,
|
||||
comment_id=comment_id,
|
||||
user_id=current_user.id,
|
||||
)
|
||||
|
||||
return comment
|
||||
|
||||
|
||||
class WorkflowCommentReplyApi(Resource):
|
||||
"""API for managing comment replies."""
|
||||
@ -229,7 +213,7 @@ class WorkflowCommentReplyDetailApi(Resource):
|
||||
|
||||
WorkflowCommentService.delete_reply(reply_id=reply_id, user_id=current_user.id)
|
||||
|
||||
return {"message": "Reply deleted successfully"}, 200
|
||||
return {"result": "success"}, 204
|
||||
|
||||
|
||||
# Register API routes
|
||||
|
||||
Reference in New Issue
Block a user