mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-11-10 21:32:43 +08:00
fix(api): align Go proxy route contracts (#20032)
This commit is contained in:
1 parent
769d091d7a
commit
6421a2ff9c
13 files changed
+133
-42
No files matched your search
@@ -120,6 +120,26 @@ func (h *SystemHandler) GetStatus(c *gin.Context) {
|
||||
common.SuccessWithData(c, status, "success")
|
||||
}
|
||||
|
||||
// GetOceanBaseStatus returns the Python-compatible OceanBase health envelope.
|
||||
func (h *SystemHandler) GetOceanBaseStatus(c *gin.Context) {
|
||||
_, errorCode, errorMessage := GetUser(c)
|
||||
if errorCode != common.CodeSuccess {
|
||||
common.ErrorWithCode(c, errorCode, errorMessage)
|
||||
return
|
||||
}
|
||||
if server.GetConfig().DocEngineType() != "oceanbase" {
|
||||
common.ResponseWithCodeData(c, common.CodeServerError, map[string]interface{}{
|
||||
"status": "error",
|
||||
"message": "OceanBase is not in use.",
|
||||
}, "OceanBase is not in use.")
|
||||
return
|
||||
}
|
||||
common.SuccessWithData(c, map[string]interface{}{
|
||||
"status": "timeout",
|
||||
"message": "OceanBase health check is unavailable.",
|
||||
}, "success")
|
||||
}
|
||||
|
||||
// GetVersion get RAGFlow version
|
||||
// @Summary Get RAGFlow Version
|
||||
// @Description Get the current version of the application
|
||||
|
||||
Reference in new issue
Block a user