Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(NOBIDS) fix api-products
Browse files Browse the repository at this point in the history
guybrush committed Jun 14, 2024
1 parent d7350c8 commit 58b8556
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions utils/products.go
Original file line number Diff line number Diff line change
@@ -7,6 +7,9 @@ const GROUP_MOBILE = "mobile"
const GROUP_ADDON = "addon"

var ProductsGroups = map[string]string{
"sapphire": GROUP_API,
"emerald": GROUP_API,
"diamond": GROUP_API,
"plankton": GROUP_MOBILE,
"goldfish": GROUP_MOBILE,
"whale": GROUP_MOBILE,
@@ -93,6 +96,12 @@ func ProductIsEligibleForAddons(productId string) bool {

func PriceIdToProductId(priceId string) string {
switch priceId {
case Config.Frontend.Stripe.Sapphire:
return "sapphire"
case Config.Frontend.Stripe.Emerald:
return "emerald"
case Config.Frontend.Stripe.Diamond:
return "diamond"
case Config.Frontend.Stripe.Plankton:
return "plankton"
case Config.Frontend.Stripe.Goldfish:

0 comments on commit 58b8556

Please sign in to comment.