Skip to content

fix: /v1/prices ignored the lookup_keys filter - #67

Merged
midagedev merged 1 commit into
mainfrom
fix/prices-lookup-keys
Aug 19, 2026
Merged

fix: /v1/prices ignored the lookup_keys filter#67
midagedev merged 1 commit into
mainfrom
fix/prices-lookup-keys

Conversation

@midagedev

@midagedev midagedev commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Problem

GET /v1/prices?lookup_keys[]=... returned the full price list regardless of the
filter. A caller that takes the first entry (a common SDK idiom) then picks a
product belonging to a different tenant.

Observed: a workspace-plan lookup asked for one tenant's yearly premium key and got
another tenant's standard yearly price, so all six tier/period slots were filled with
the wrong product and the upgrade screen rendered empty.

Fix

filterPrices now checks lookup_keys[] (and the bare lookup_keys form). An absent
or empty parameter keeps the previous behaviour of returning everything.

Verification

go test ./... -count=1 green across all packages (12 ok). New TestFilterPricesLookupKeys
covers single key, multiple keys (OR), no match, empty parameter, and combination with
other filters.

…r tenants' products

GET /v1/prices?lookup_keys[]=... returned the full price list regardless of the
filter. A caller that takes the first entry (a common SDK idiom) then picks a
product belonging to a different tenant.

Observed: a workspace-plan lookup asked for one tenant's yearly premium key and
got another tenant's standard yearly price, so all six tier/period slots were
filled with the wrong product and the upgrade screen rendered empty.

filterPrices now checks lookup_keys[] (and the bare lookup_keys form). An absent
or empty parameter keeps the previous behaviour of returning everything.

go test ./... -count=1 green across all packages.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@midagedev
midagedev force-pushed the fix/prices-lookup-keys branch from 5834d65 to 8592690 Compare August 19, 2026 04:42
@midagedev midagedev changed the title fix: /v1/prices 가 lookup_keys 필터를 무시해 다른 테넌트 상품을 내려주던 문제 수정 fix: /v1/prices ignored the lookup_keys filter Aug 19, 2026
@midagedev
midagedev merged commit cbed0f7 into main Aug 19, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant