Skip to content

Commit

Permalink
Special treatment for arm equipment
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkLeong committed Mar 15, 2023
1 parent eb483a4 commit 076b719
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions route/v1/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 076b719

Please sign in to comment.