From 076b7198b2c01a804b443ec8e375df380c2d710a Mon Sep 17 00:00:00 2001 From: link Date: Wed, 15 Mar 2023 06:20:58 +0000 Subject: [PATCH] Special treatment for arm equipment --- route/v1/system.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/route/v1/system.go b/route/v1/system.go index 28e1eb91b..7e9d772e6 100644 --- a/route/v1/system.go +++ b/route/v1/system.go @@ -24,7 +24,6 @@ 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 @@ -179,19 +178,20 @@ func GetSystemHardwareInfo(c *gin.Context) { data := make(map[string]string, 1) data["drive_model"] = service.MyService.System().GetDeviceTree() if runtime.GOARCH == "arm" { - data["arch"]= "arm-7" - }else{ - data["arch"]= runtime.GOARCH + 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, - Message: common_err.GetMsg(common_err.SUCCESS), - Data: data, - }) + c.JSON(common_err.SUCCESS, + model.Result{ + Success: common_err.SUCCESS, + Message: common_err.GetMsg(common_err.SUCCESS), + Data: data, + }) + } } // @Summary system utilization