platform: Fix missing api version check for usb/ip

This commit is contained in:
世界 2026-06-21 18:38:08 +08:00
parent 64a0e0ce6b
commit 8e9c61afa3
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -711,6 +711,16 @@ func (c *CommandClient) GetStartedAt() (int64, error) {
})
}
func (c *CommandClient) GetAPIVersion() (int32, error) {
return callWithResult(c, func(ctx context.Context, client daemon.StartedServiceClient) (int32, error) {
version, err := client.GetVersion(ctx, &emptypb.Empty{})
if err != nil {
return 0, E.Cause(err, "get version")
}
return version.ApiVersion, nil
})
}
func (c *CommandClient) SetGroupExpand(groupTag string, isExpand bool) error {
_, err := callWithResult(c, func(ctx context.Context, client daemon.StartedServiceClient) (*emptypb.Empty, error) {
return client.SetGroupExpand(ctx, &daemon.SetGroupExpandRequest{