mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Bug solved on desktop request ibm services
This commit is contained in:
@@ -41,7 +41,8 @@ export class AuthService {
|
||||
|
||||
|
||||
async login(user: UserForm): Promise<boolean> {
|
||||
user.BasicAuthKey = 'Basic ' + btoa(user.username + '@' + user.domainName + ':' + user.password); //conversão em base64 das credenciais inseridas
|
||||
//user.BasicAuthKey = 'Basic ' + btoa(user.username + '@' + user.domainName + ':' + user.password);
|
||||
user.BasicAuthKey = 'Basic ' + btoa(user.username + ':' + user.password); //conversão em base64 das credenciais inseridas
|
||||
|
||||
|
||||
const options = { headers: {'Authorization': user.BasicAuthKey }};
|
||||
@@ -55,12 +56,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 +73,11 @@ export class AuthService {
|
||||
|
||||
this.storageService.store(AuthConnstants.USER, response);
|
||||
|
||||
return result;
|
||||
return true;
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
return result;
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -118,15 +118,6 @@ export class EventsService {
|
||||
|
||||
params = params.set("Start", startdate);
|
||||
params = params.set("End", enddate);
|
||||
|
||||
/* switch (this.loggeduser.Profile == 'MDGPR') {
|
||||
case value:
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
} */
|
||||
|
||||
let options = {
|
||||
headers: this.headersPrOficial,
|
||||
|
||||
Reference in New Issue
Block a user