ptechcore_ui 1.0.43 → 1.0.46
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/dist/index.cjs +3 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -951,7 +951,7 @@ var AuthServices = {
|
|
|
951
951
|
addUser: (payload) => FetchApi.post(`${API_BASE_URL}add-user/`, payload),
|
|
952
952
|
login: (payload) => FetchApi.post(`${API_BASE_URL}login/`, payload),
|
|
953
953
|
getUserInformations: (token) => FetchApi.get(`${API_BASE_URL}user-informations/`, token),
|
|
954
|
-
getUserInformationsByOldId: (id) => FetchApi.get(`${API_BASE_URL}user-informations-by-old-id
|
|
954
|
+
getUserInformationsByOldId: (id) => FetchApi.get(`${API_BASE_URL}${id}/user-informations-by-old-id/`),
|
|
955
955
|
logout: () => FetchApi.post(`${API_BASE_URL}logout/`)
|
|
956
956
|
};
|
|
957
957
|
|
|
@@ -1086,6 +1086,8 @@ var SessionProvider = ({ children }) => {
|
|
|
1086
1086
|
const result = res;
|
|
1087
1087
|
if (result.success === true) {
|
|
1088
1088
|
setLoggedUser(result.data.user);
|
|
1089
|
+
localStorage.setItem("token", result.data.token);
|
|
1090
|
+
setToken(result.data.token);
|
|
1089
1091
|
setActiveBusinessEntity(
|
|
1090
1092
|
result.data.user.centers_access.find((item) => parseInt(String(item.id)) === parseInt(saved_center_id)) || result.data.user.centers_access[0] || null
|
|
1091
1093
|
);
|
package/dist/index.js
CHANGED
|
@@ -848,7 +848,7 @@ var AuthServices = {
|
|
|
848
848
|
addUser: (payload) => FetchApi.post(`${API_BASE_URL}add-user/`, payload),
|
|
849
849
|
login: (payload) => FetchApi.post(`${API_BASE_URL}login/`, payload),
|
|
850
850
|
getUserInformations: (token) => FetchApi.get(`${API_BASE_URL}user-informations/`, token),
|
|
851
|
-
getUserInformationsByOldId: (id) => FetchApi.get(`${API_BASE_URL}user-informations-by-old-id
|
|
851
|
+
getUserInformationsByOldId: (id) => FetchApi.get(`${API_BASE_URL}${id}/user-informations-by-old-id/`),
|
|
852
852
|
logout: () => FetchApi.post(`${API_BASE_URL}logout/`)
|
|
853
853
|
};
|
|
854
854
|
|
|
@@ -983,6 +983,8 @@ var SessionProvider = ({ children }) => {
|
|
|
983
983
|
const result = res;
|
|
984
984
|
if (result.success === true) {
|
|
985
985
|
setLoggedUser(result.data.user);
|
|
986
|
+
localStorage.setItem("token", result.data.token);
|
|
987
|
+
setToken(result.data.token);
|
|
986
988
|
setActiveBusinessEntity(
|
|
987
989
|
result.data.user.centers_access.find((item) => parseInt(String(item.id)) === parseInt(saved_center_id)) || result.data.user.centers_access[0] || null
|
|
988
990
|
);
|