Skip to content

Commit

Permalink
numPerInterval for Leo sku is 192, 2 is default (#1998)
Browse files Browse the repository at this point in the history
  • Loading branch information
husobee authored Sep 20, 2023
1 parent 54a3520 commit eb99e01
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions services/skus/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,13 @@ func (s *Service) CreateOrderFromRequest(ctx context.Context, req model.CreateOr
return nil, err
}

// TODO: we ultimately need to figure out how to provision numPerInterval and numIntervals
// on the order item instead of the order itself to support multiple orders with
// different time limited v2 issuers. For now leo sku needs 192 as num per interval
if orderItem.SKU == "brave-leo-premium" {
numPerInterval = 192 // 192 credentials per day for leo
}

// Create issuer for sku. This only happens when a new sku is created.
switch orderItem.CredentialType {
case singleUse:
Expand Down

0 comments on commit eb99e01

Please sign in to comment.