fleet/ee/server/service/devices.go
Juan Fernandez b60d535d4a
Feature 7084: Add new EE endpoint for Fleet Desktop (#7530)
Added new EE endpoint, that is meant to be used by Fleet Desktop only. The new endpoint will return the number of failed policies.
2022-09-12 15:37:38 -04:00

16 lines
388 B
Go

package service
import (
"context"
"github.com/fleetdm/fleet/v4/server/fleet"
)
func (svc *Service) ListDevicePolicies(ctx context.Context, host *fleet.Host) ([]*fleet.HostPolicy, error) {
return svc.ds.ListPoliciesForHost(ctx, host)
}
func (svc *Service) FailingPoliciesCount(ctx context.Context, host *fleet.Host) (uint, error) {
return svc.ds.FailingPoliciesCount(ctx, host)
}