fix(web): append /api to baseUrl for shared clients
getBaseUrl() returns 'http://localhost:4003' without /api suffix. Shared feature-flag-client and subscription-client expect the API prefix in the URL. Without this fix, requests hit /flags/poll and /subscriptions/me instead of /api/flags/poll and /api/subscriptions/me.
This commit is contained in:
parent
6dd31490b2
commit
83e54c29be
@ -17,7 +17,7 @@ let _client: ReturnType<typeof createSubscriptionClient> | null = null;
|
||||
function getClient() {
|
||||
if (!_client) {
|
||||
_client = createSubscriptionClient({
|
||||
baseUrl: getBaseUrl(),
|
||||
baseUrl: `${getBaseUrl()}/api`,
|
||||
productId: PRODUCT_ID,
|
||||
userId: 'me',
|
||||
getAccessToken: () => getAuthClient().getAccessToken() ?? '',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user