@bagelink/sdk 0.0.857 → 0.0.859

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.
@@ -10,11 +10,16 @@ const ax: AxiosInstance = axios
10
10
 
11
11
  ax.interceptors.request.use((config) => {
12
12
  const token = localStorage.getItem('access_token')
13
- if (token !== null && config.headers) { config.headers.Authorization = `Bearer ${token} ` }
13
+ if (token !== null && config.headers) {
14
+ config.headers.Authorization = `Bearer ${token} `
15
+ }
14
16
 
15
17
  const urlParams = new URLSearchParams(window.location.search)
16
18
  const resetToken = urlParams.get('token')
17
- if (resetToken !== null) config.data = { ...config.data, token: resetToken }
19
+
20
+ if (resetToken !== null && config.headers) {
21
+ config.headers.Authorization = `Bearer ${resetToken} `
22
+ }
18
23
  return config
19
24
  })
20
25
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/sdk",
3
3
  "type": "module",
4
- "version": "0.0.857",
4
+ "version": "0.0.859",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",