同步上游v0.1.74并禁用更新模块显示和后台检查
Some checks failed
CI / test (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
Security Scan / backend-security (push) Has been cancelled
Security Scan / frontend-security (push) Has been cancelled

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
huangzhenpc
2026-02-08 00:37:57 +08:00
parent 314403e5c1
commit d66394c0b8
4 changed files with 14 additions and 14 deletions

View File

@@ -35,13 +35,13 @@ func (h *SystemHandler) GetVersion(c *gin.Context) {
// CheckUpdates checks for available updates
// GET /api/v1/admin/system/check-updates
func (h *SystemHandler) CheckUpdates(c *gin.Context) {
force := c.Query("force") == "true"
info, err := h.updateSvc.CheckUpdate(c.Request.Context(), force)
if err != nil {
response.Error(c, http.StatusInternalServerError, err.Error())
return
}
response.Success(c, info)
info, _ := h.updateSvc.CheckUpdate(c.Request.Context(), false)
response.Success(c, gin.H{
"current_version": info.CurrentVersion,
"latest_version": info.CurrentVersion,
"has_update": false,
"build_type": "source",
})
}
// PerformUpdate downloads and applies the update