Browse Source

Update ip address

LinkLeong 2 years ago
parent
commit
e0e9f97764
2 changed files with 2 additions and 2 deletions
  1. 1 1
      go.mod
  2. 1 1
      service/system.go

+ 1 - 1
go.mod

@@ -41,6 +41,7 @@ require (
 	go.uber.org/goleak v1.2.1
 	go.uber.org/goleak v1.2.1
 	go.uber.org/zap v1.24.0
 	go.uber.org/zap v1.24.0
 	golang.org/x/crypto v0.8.0
 	golang.org/x/crypto v0.8.0
+	golang.org/x/net v0.9.0
 	golang.org/x/oauth2 v0.6.0
 	golang.org/x/oauth2 v0.6.0
 	golang.org/x/sync v0.1.0
 	golang.org/x/sync v0.1.0
 	golang.org/x/sys v0.7.0
 	golang.org/x/sys v0.7.0
@@ -123,7 +124,6 @@ require (
 	golang.org/x/arch v0.3.0 // indirect
 	golang.org/x/arch v0.3.0 // indirect
 	golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect
 	golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect
 	golang.org/x/image v0.6.0 // indirect
 	golang.org/x/image v0.6.0 // indirect
-	golang.org/x/net v0.9.0 // indirect
 	golang.org/x/text v0.9.0 // indirect
 	golang.org/x/text v0.9.0 // indirect
 	golang.org/x/time v0.3.0 // indirect
 	golang.org/x/time v0.3.0 // indirect
 	google.golang.org/appengine v1.6.7 // indirect
 	google.golang.org/appengine v1.6.7 // indirect

+ 1 - 1
service/system.go

@@ -113,7 +113,7 @@ func (c *systemService) GetDeviceInfo() model.DeviceInfo {
 	osRelease, _ := file.ReadOSRelease()
 	osRelease, _ := file.ReadOSRelease()
 	m.DeviceModel = osRelease["MODEL"]
 	m.DeviceModel = osRelease["MODEL"]
 	m.DeviceSN = osRelease["SN"]
 	m.DeviceSN = osRelease["SN"]
-	res := httper.Get("http://127.0.0.1"+strconv.Itoa(m.Port)+"/v1/users/status", nil)
+	res := httper.Get("http://127.0.0.1:"+strconv.Itoa(m.Port)+"/v1/users/status", nil)
 	init := gjson.Get(res, "data.initialized")
 	init := gjson.Get(res, "data.initialized")
 	m.Initialized, _ = strconv.ParseBool(init.Raw)
 	m.Initialized, _ = strconv.ParseBool(init.Raw)