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:
saravanakumardb1 2026-03-19 17:08:44 -07:00
parent 6dd31490b2
commit 83e54c29be

View File

@ -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() ?? '',