Socket update (#1159)

This commit is contained in:
link 2023-06-01 10:22:04 +08:00 committed by GitHub
parent 9bfe37305c
commit d911d80254
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,7 +62,7 @@ func (s *CasaOS) GetZerotierInfo(ctx echo.Context) error {
via := gjson.GetBytes(res, "routes.0.via").Str
info.Id = utils.Ptr(gjson.GetBytes(res, "id").Str)
info.Name = &name
if len(via) != 0 {
if len(via) == 0 {
info.Status = utils.Ptr("online")
} else {
info.Status = utils.Ptr("offline")