@imposium-hub/components 1.34.3 → 1.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imposium-hub/components",
3
- "version": "1.34.3",
3
+ "version": "1.36.0",
4
4
  "description": "React & Typescript component / asset library for Imposium front-ends",
5
5
  "main": "dist/components.js",
6
6
  "scripts": {
@@ -26,9 +26,12 @@ export default class SessionService {
26
26
  /*
27
27
  Get list of accessible services with themes from Imposium API
28
28
  */
29
- public static getAccessData = (idToken : string) : Promise<any[]> => {
29
+ public static getAccessData = (idToken : string, baseUrl? : string) : Promise<any[]> => {
30
30
  return new Promise((resolve, reject) => {
31
- axios.get(SessionService.determineAccessUrl(), {headers: {Authorization: `Bearer ${idToken}`}})
31
+
32
+ const accessUrl = (baseUrl) ? `${baseUrl}/access` : SessionService.determineAccessUrl();
33
+
34
+ axios.get(accessUrl, {headers: {Authorization: `Bearer ${idToken}`}})
32
35
  .then((res : AxiosResponse) => {
33
36
  resolve((res.data) ? res.data : []);
34
37
  })