Browse Source

Task/extend subscription offer key type (#6022)

* Extend SubscriptionOfferKey
pull/6024/head
Thomas Kaul 11 hours ago
committed by GitHub
parent
commit
d0d1a2ac88
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      apps/api/src/app/subscription/subscription.service.ts
  2. 3
      libs/common/src/lib/types/subscription-offer-key.type.ts

2
apps/api/src/app/subscription/subscription.service.ts

@ -179,6 +179,8 @@ export class SubscriptionService {
offerKey = 'renewal-early-bird-2023';
} else if (isBefore(createdAt, parseDate('2024-01-01'))) {
offerKey = 'renewal-early-bird-2024';
} else if (isBefore(createdAt, parseDate('2025-12-01'))) {
offerKey = 'renewal-early-bird-2025';
}
const offer = await this.getSubscriptionOffer({

3
libs/common/src/lib/types/subscription-offer-key.type.ts

@ -2,4 +2,5 @@ export type SubscriptionOfferKey =
| 'default'
| 'renewal'
| 'renewal-early-bird-2023'
| 'renewal-early-bird-2024';
| 'renewal-early-bird-2024'
| 'renewal-early-bird-2025';

Loading…
Cancel
Save