Skip to content

Commit

Permalink
fix: website domain
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Jul 10, 2024
1 parent 3beb75e commit 4ffbcfc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
6 changes: 2 additions & 4 deletions lib/build/querier.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions lib/ts/querier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,14 @@ export class Querier {
const st = SuperTokens.getInstanceOrThrowError();
const appInfo = st.appInfo;

const request = st.getRequestFromUserContext(userContext);
const queryParamsObj: {
apiDomain: string;
websiteDomain?: string;
websiteDomain: string;
} = {
apiDomain: appInfo.apiDomain.getAsStringDangerous(),
websiteDomain: appInfo.getOrigin({ request, userContext }).getAsStringDangerous(),
};
const request = st.getRequestFromUserContext(userContext);
if (request !== undefined) {
queryParamsObj.websiteDomain = appInfo.getOrigin({ request, userContext }).getAsStringDangerous();
}
const queryParams = new URLSearchParams(queryParamsObj).toString();

let { body: response } = await this.sendRequestHelper(
Expand Down

0 comments on commit 4ffbcfc

Please sign in to comment.