From 226c2f658dbf41498a6c474f2ffcd789787bde20 Mon Sep 17 00:00:00 2001 From: emmdim Date: Fri, 22 Nov 2024 12:33:53 +0100 Subject: [PATCH] Minor fix with plan IDs --- db/organizations_test.go | 1 + stripe/stripe.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/db/organizations_test.go b/db/organizations_test.go index 29d7a11..6d38bf2 100644 --- a/db/organizations_test.go +++ b/db/organizations_test.go @@ -200,6 +200,7 @@ func TestAddOrganizationPlan(t *testing.T) { active := true stripeID := "stripeID" orgSubscription := &OrganizationSubscription{ + PlanID: 100, StartDate: startDate, EndDate: endDate, Active: true, diff --git a/stripe/stripe.go b/stripe/stripe.go index cf17a29..64e9970 100644 --- a/stripe/stripe.go +++ b/stripe/stripe.go @@ -121,7 +121,7 @@ func (s *StripeClient) GetPlans() ([]*db.Plan, error) { }) } plans = append(plans, &db.Plan{ - ID: uint64(i), + ID: uint64(i + 1), Name: price.Nickname, StartingPrice: startingPrice, StripeID: price.ID,