Revert "feat(go-api): Add Go chat session message delete and feedback APIs (#…"

This reverts commit a553886989.
This commit is contained in:
Jin Hai
2026-06-29 21:01:22 +08:00
committed by GitHub
parent 1c0cdd84ce
commit e2c2d8d61a
5 changed files with 9 additions and 1159 deletions

View File

@@ -474,53 +474,3 @@ func (h *ChatSessionHandler) UpdateSession(c *gin.Context) {
}
jsonResponse(c, common.CodeSuccess, result, "success")
}
func (h *ChatSessionHandler) DeleteSessionMessage(c *gin.Context) {
user, errorCode, errorMessage := GetUser(c)
if errorCode != common.CodeSuccess {
jsonError(c, errorCode, errorMessage)
return
}
userID := user.ID
chatID, sessionID, msgID := c.Param("chat_id"), c.Param("session_id"), c.Param("msg_id")
result, code, err := h.chatSessionService.DeleteSessionMessage(userID, chatID, sessionID, msgID)
if err != nil {
if code == common.CodeAuthenticationError {
jsonResponse(c, code, false, err.Error())
return
}
jsonError(c, code, err.Error())
return
}
jsonResponse(c, common.CodeSuccess, result, "success")
}
func (h *ChatSessionHandler) UpdateMessageFeedback(c *gin.Context) {
user, errorCode, errorMessage := GetUser(c)
if errorCode != common.CodeSuccess {
jsonError(c, errorCode, errorMessage)
return
}
userID := user.ID
chatID, sessionID, msgID := c.Param("chat_id"), c.Param("session_id"), c.Param("msg_id")
req := map[string]interface{}{}
if err := c.ShouldBindJSON(&req); err != nil {
jsonError(c, common.CodeArgumentError, "Invalid request: "+err.Error())
return
}
result, code, err := h.chatSessionService.UpdateMessageFeedback(userID, chatID, sessionID, msgID, req)
if err != nil {
if code == common.CodeAuthenticationError {
jsonResponse(c, code, false, err.Error())
return
}
jsonError(c, code, err.Error())
return
}
jsonResponse(c, common.CodeSuccess, result, "success")
}