Skip to content

Commit b4174c0

Browse files
authored
Merge pull request #207 from SkynetLabs/ivo/fix_stripe_product_description
Fix Stripe product description display
2 parents 37565c5 + 3e618e7 commit b4174c0

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

api/stripe.go

+2
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ func (api *API) stripePricesGET(_ *database.User, w http.ResponseWriter, _ *http
254254
Limit: &stripePageSize,
255255
},
256256
}
257+
product := "data.product"
258+
params.Expand = []*string{&product}
257259
params.Filters.AddFilter("limit", "", fmt.Sprint(stripePageSize))
258260
i := price.List(params)
259261
for i.Next() {

test/api/stripe_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ func testStripePricesGET(t *testing.T, at *test.AccountsTester) {
123123
testPrices := api.StripePrices()
124124
left := len(testPrices)
125125
for _, p := range ps {
126+
if p.Description == "" {
127+
t.Errorf("Empty description for price %s", p.ID)
128+
}
126129
if _, exist := testPrices[p.ID]; exist {
127130
left--
128131
}

0 commit comments

Comments
 (0)