This commit is contained in:
tiago.kayaya
2021-06-25 12:06:18 +01:00
parent 983423b906
commit 3fbdfc1296
10 changed files with 38 additions and 40 deletions
+3 -4
View File
@@ -55,12 +55,11 @@ export class AuthService {
let response: any;
try {
result = await this.http.get<boolean>(service, options).toPromise();
response = await this.http.post<User>(environment.apiURL + "UserAuthentication/Login", '', this.opts).toPromise();
console.log(response);
if (result) {
if (response) {
if( response.RoleID == 100000014) {
response.Profile = 'PR'
} else if(response.RoleID == 100000011) {
@@ -73,11 +72,11 @@ export class AuthService {
this.storageService.store(AuthConnstants.USER, response);
return result;
return true;
}
} catch (error) {
return result;
return false;
}
}