mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-05-04 17:27:50 +08:00
Update ext field type of heartbeat message (#13490)
### What problem does this PR solve? As title ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@ -642,7 +642,7 @@ func (h *Handler) GetUserPermission(c *gin.Context) {
|
||||
|
||||
// GetServices handle get all services
|
||||
func (h *Handler) GetServices(c *gin.Context) {
|
||||
services, err := h.service.GetAllServices()
|
||||
services, err := h.service.ListServices()
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{
|
||||
"code": common.CodeServerError,
|
||||
@ -908,7 +908,10 @@ func (h *Handler) TestSandboxConnection(c *gin.Context) {
|
||||
|
||||
result, err := h.service.TestSandboxConnection(req.ProviderType, req.Config)
|
||||
if err != nil {
|
||||
errorResponse(c, err.Error(), 400)
|
||||
c.JSON(http.StatusBadRequest, gin.H{
|
||||
"code": common.CodeBadRequest,
|
||||
"message": "Invalid access token",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
@ -962,7 +965,10 @@ func (h *Handler) HandleNoRoute(c *gin.Context) {
|
||||
func (h *Handler) Reports(c *gin.Context) {
|
||||
var req common.BaseMessage
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
errorResponse(c, "Invalid request body: "+err.Error(), 400)
|
||||
c.JSON(http.StatusBadRequest, gin.H{
|
||||
"code": common.CodeBadRequest,
|
||||
"message": "Invalid request body: " + err.Error(),
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
@ -973,7 +979,10 @@ func (h *Handler) Reports(c *gin.Context) {
|
||||
|
||||
// Only process heartbeat messages for now
|
||||
if req.MessageType != common.MessageHeartbeat {
|
||||
errorResponse(c, "Unsupported report type: "+string(req.MessageType), 400)
|
||||
c.JSON(http.StatusBadRequest, gin.H{
|
||||
"code": common.CodeBadRequest,
|
||||
"message": "Unsupported report type: " + string(req.MessageType),
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user