From eb483a4c5d8a15552443a057633122401c9c8863 Mon Sep 17 00:00:00 2001 From: link Date: Wed, 15 Mar 2023 10:46:12 +0800 Subject: [PATCH] Change log (#955) --- route/v1/system.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/route/v1/system.go b/route/v1/system.go index 28a2e22..28e1eb9 100644 --- a/route/v1/system.go +++ b/route/v1/system.go @@ -24,6 +24,7 @@ import ( model2 "github.com/IceWhaleTech/CasaOS/service/model" "github.com/IceWhaleTech/CasaOS/types" "github.com/gin-gonic/gin" + "golang.org/x/tools/go/analysis/passes/ifaceassert" ) // @Summary check version @@ -177,7 +178,14 @@ func PostKillCasaOS(c *gin.Context) { func GetSystemHardwareInfo(c *gin.Context) { data := make(map[string]string, 1) data["drive_model"] = service.MyService.System().GetDeviceTree() - data["arch"] = runtime.GOARCH + if runtime.GOARCH == "arm" { + data["arch"]= "arm-7" + }else{ + data["arch"]= runtime.GOARCH + } + + if cpu := service.MyService.System().GetCpuInfo(); len(cpu) > 0 { + c.JSON(common_err.SUCCESS, model.Result{ Success: common_err.SUCCESS,