Browse Source
Task/extend subscription offer key type (#6022)
* Extend SubscriptionOfferKey
pull/6024/head
Thomas Kaul
11 hours ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
4 additions and
1 deletions
-
apps/api/src/app/subscription/subscription.service.ts
-
libs/common/src/lib/types/subscription-offer-key.type.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({ |
|
|
|
|
|
|
|
@ -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'; |
|
|
|
|