smart support over ssh + change response code for smart failure

This commit is contained in:
henrygd
2025-10-26 10:33:34 -04:00
parent e646f2c1fc
commit b107d12a62
2 changed files with 5 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ import (
"github.com/henrygd/beszel"
"github.com/henrygd/beszel/internal/common"
"github.com/henrygd/beszel/internal/entities/smart"
"github.com/henrygd/beszel/internal/entities/system"
"github.com/blang/semver"
@@ -170,6 +171,8 @@ func (a *Agent) handleSSHRequest(w io.Writer, req *common.HubRequest[cbor.RawMes
response.SystemData = v
case string:
response.String = &v
case map[string]smart.SmartData:
response.SmartData = v
default:
response.Error = fmt.Sprintf("unsupported response type: %T", data)
}