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:
Jin Hai
2026-03-10 10:49:39 +08:00
committed by GitHub
parent 02108772d8
commit 7f6a9e8ee9
4 changed files with 25 additions and 16 deletions

View File

@ -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
}