Skip to content

Commit 676dd36

Browse files
authored
fix: NoAccessValue in entitlements (#3066)
1 parent f19ee8e commit 676dd36

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

openmeter/customer/service/customer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func (s *Service) GetEntitlementValue(ctx context.Context, input customer.GetEnt
123123
val, err := s.entitlementConnector.GetEntitlementValue(ctx, input.CustomerID.Namespace, subjectKey, input.FeatureKey, clock.Now())
124124
if err != nil {
125125
if _, ok := lo.ErrorsAs[*entitlement.NotFoundError](err); ok {
126-
return entitlement.NoAccessValue{}, nil
126+
return &entitlement.NoAccessValue{}, nil
127127
}
128128

129129
return nil, err

openmeter/entitlement/entitlement_types.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ type EntitlementValue interface {
1111
HasAccess() bool
1212
}
1313

14+
var _ EntitlementValue = (*NoAccessValue)(nil)
15+
1416
type NoAccessValue struct{}
1517

16-
func (NoAccessValue) HasAccess() bool {
18+
func (*NoAccessValue) HasAccess() bool {
1719
return false
1820
}
1921

0 commit comments

Comments
 (0)