Compare commits

...

2 Commits

Author SHA1 Message Date
Arik Chakma
663908c223 fix: rename key 2025-09-02 01:02:02 +06:00
Arik Chakma
772c90c892 feat: add roadmap key 2025-09-02 00:55:12 +06:00
2 changed files with 10 additions and 2 deletions

View File

@@ -7,4 +7,6 @@ PUBLIC_STRIPE_INDIVIDUAL_MONTHLY_PRICE_ID=
PUBLIC_STRIPE_INDIVIDUAL_YEARLY_PRICE_ID=
PUBLIC_STRIPE_INDIVIDUAL_MONTHLY_PRICE_AMOUNT=10
PUBLIC_STRIPE_INDIVIDUAL_YEARLY_PRICE_AMOUNT=100
PUBLIC_STRIPE_INDIVIDUAL_YEARLY_PRICE_AMOUNT=100
ROADMAP_API_KEY=

View File

@@ -44,7 +44,9 @@ export async function httpCall<ResponseType = AppResponse>(
: `${import.meta.env.PUBLIC_API_URL}${url}`;
try {
let visitorId = '';
if (typeof window !== 'undefined') {
const isServer = typeof window === 'undefined';
if (!isServer) {
const fingerprintPromise = await fp.load();
const fingerprint = await fingerprintPromise.get();
visitorId = fingerprint.visitorId;
@@ -59,6 +61,10 @@ export async function httpCall<ResponseType = AppResponse>(
...(options?.headers ?? {}),
});
if (isServer) {
headers.set('roadmap-api-key', import.meta.env.ROADMAP_API_KEY);
}
if (!isMultiPartFormData) {
headers.set('Content-Type', 'application/json');
}