We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 200ae2c commit b27fcc7Copy full SHA for b27fcc7
src/app/models/adoption-info.ts
@@ -8,7 +8,15 @@ export type AdoptionData = {
8
}[];
9
};
10
11
-const url = 'https://salesforce.openstax.org/api/v1/adoptions';
+type WindowWithSettings = typeof window & {
12
+ SETTINGS: {
13
+ accountHref: string;
14
+ };
15
+}
16
+const w = window as WindowWithSettings;
17
+const subdomains = ['staging.'];
18
+const subdomain = subdomains.find((sd) => w.SETTINGS.accountHref?.includes(sd)) || '';
19
+const url = `https://${subdomain}salesforce.openstax.org/api/v1/adoptions`;
20
const TESTING = process.env.JEST_WORKER_ID !== undefined;
21
/* eslint-disable camelcase */
22
const testData = {
0 commit comments