mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user