mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-28 03:38:11 +08:00
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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user