Go CLI: Fix alter role (#16226)

### 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-06-22 17:33:47 +08:00
committed by GitHub
parent 329e09f16a
commit 05e758e4fe
10 changed files with 453 additions and 396 deletions

View File

@@ -622,6 +622,23 @@ func (h *Handler) ShutdownService(c *gin.Context) {
success(c, result, "")
}
// StartService handle start service
func (h *Handler) StartService(c *gin.Context) {
serviceID := c.Param("service_id")
if serviceID == "" {
errorResponse(c, "Service ID is required", 400)
return
}
result, err := h.service.StartService(serviceID)
if err != nil {
errorResponse(c, err.Error(), 500)
return
}
success(c, result, "")
}
// RestartService handle restart service
func (h *Handler) RestartService(c *gin.Context) {
serviceID := c.Param("service_id")