visorus-erp-core 13.0.0 → 13.0.1
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/esm2020/lib/services/auth.service.mjs +22 -1
- package/fesm2015/visorus-erp-core.mjs +21 -0
- package/fesm2015/visorus-erp-core.mjs.map +1 -1
- package/fesm2020/visorus-erp-core.mjs +21 -0
- package/fesm2020/visorus-erp-core.mjs.map +1 -1
- package/lib/services/auth.service.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1134,6 +1134,27 @@ class AuthService {
|
|
|
1134
1134
|
this.url_host = config.url;
|
|
1135
1135
|
return this.httpClient.get(this.url_host + '/usuario/obtieneUsuarioActual', httpOptions);
|
|
1136
1136
|
}
|
|
1137
|
+
obtieneUsuarioConfiguracion() {
|
|
1138
|
+
let usuario;
|
|
1139
|
+
let token_type = '';
|
|
1140
|
+
let access_token = '';
|
|
1141
|
+
usuario = JSON.parse(localStorage.getItem("usuario"));
|
|
1142
|
+
if (usuario) {
|
|
1143
|
+
token_type = usuario.token_type,
|
|
1144
|
+
access_token = usuario.access_token;
|
|
1145
|
+
}
|
|
1146
|
+
let httpOptions = {
|
|
1147
|
+
headers: new HttpHeaders({
|
|
1148
|
+
'Accept-type': 'application/json',
|
|
1149
|
+
'Authorization': token_type + ' ' + access_token
|
|
1150
|
+
})
|
|
1151
|
+
};
|
|
1152
|
+
let config = JSON.parse(localStorage.getItem("config"));
|
|
1153
|
+
if (config)
|
|
1154
|
+
if (config.url)
|
|
1155
|
+
this.url_host = config.url;
|
|
1156
|
+
return this.httpClient.get(this.url_host + '/usuario/obtieneUsuarioConfiguracion', httpOptions);
|
|
1157
|
+
}
|
|
1137
1158
|
}
|
|
1138
1159
|
/** @nocollapse */ AuthService.ɵfac = function AuthService_Factory(t) { return new (t || AuthService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
1139
1160
|
/** @nocollapse */ AuthService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: AuthService, factory: AuthService.ɵfac, providedIn: 'root' });
|