MCPcopy
hub / github.com/IceWhaleTech/CasaOS / SystemUpdate

Function SystemUpdate

route/v1/system.go:65–71  ·  view source on GitHub ↗

@Summary 系统信息 @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /sys/update [post]

(ctx echo.Context)

Source from the content-addressed store, hash-verified

63// @Success 200 {string} string "ok"
64// @Router /sys/update [post]
65func SystemUpdate(ctx echo.Context) error {
66 need, version := version.IsNeedUpdate(service.MyService.Casa().GetCasaosVersion())
67 if need {
68 service.MyService.System().UpdateSystemVersion(version.Version)
69 }
70 return ctx.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS)})
71}
72
73// @Summary get logs
74// @Produce application/json

Callers

nothing calls this directly

Calls 6

IsNeedUpdateFunction · 0.92
GetMsgFunction · 0.92
GetCasaosVersionMethod · 0.65
CasaMethod · 0.65
UpdateSystemVersionMethod · 0.65
SystemMethod · 0.65

Tested by

no test coverage detected