@timum/timum_pdk 1.0.13 → 1.0.14

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +10 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timum/timum_pdk",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "license": "MIT",
5
5
  "description": "Contains timum public and general api endpoints",
6
6
  "homepage": "https://www.timum.de",
package/src/index.js CHANGED
@@ -2,8 +2,17 @@ import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
2
2
 
3
3
  import { reactLocalStorage } from "reactjs-localstorage";
4
4
 
5
+ const host = undefined;
6
+ export const setTimumApiHost = (url) => {
7
+ host = url;
8
+ };
9
+
5
10
  export const getTimumApiHost = () => {
6
- return reactLocalStorage.get("timumApiHost", "https://www.timum.de");
11
+ if (host) {
12
+ return host;
13
+ } else {
14
+ return reactLocalStorage.get("timumApiHost", "https://www.timum.de");
15
+ }
7
16
  };
8
17
 
9
18
  // we do it this way so that the base url can be determined dynamically