Skip to content
Prev Previous commit
Next Next commit
fix TTA-83: Sonarcloud fix
  • Loading branch information
Rodrigo Lins committed Jul 27, 2022
commit 1ccac539e26779594572aba5a3afd0db9aa8d663
2 changes: 1 addition & 1 deletion src/app/modules/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { SocialAuthService, SocialUser } from 'angularx-social-login';
import { environment } from 'src/environments/environment';
import { EnvironmentType } from 'src/environments/enum';
import { LoginService } from './services/login.service';
import { tap } from 'rxjs/operators';

@Component({
selector: 'app-login',
templateUrl: './login.component.html',
Expand Down
3 changes: 1 addition & 2 deletions src/app/modules/login/services/azure.ad.b2c.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class AzureAdB2CService {

isValidToken(token: string) {
const body = { token };
const observable = this.http.post(`${this.baseUrl}/validate-token`, body).pipe(
return this.http.post(`${this.baseUrl}/validate-token`, body).pipe(
map((response) => {
const responseString = JSON.stringify(response);
const responseJson = JSON.parse(responseString);
Expand All @@ -111,6 +111,5 @@ export class AzureAdB2CService {
return isValid ? true : false;
})
);
return observable;
}
}
3 changes: 1 addition & 2 deletions src/app/modules/login/services/login.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class LoginService {

isValidToken(token: string) {
const body = { token };
const observable = this.http.post(`${this.baseUrl}/validate-token`, body).pipe(
return this.http.post(`${this.baseUrl}/validate-token`, body).pipe(
map((response) => {
const responseString = JSON.stringify(response);
const responseJson = JSON.parse(responseString);
Expand All @@ -98,7 +98,6 @@ export class LoginService {
return responseString !== '{}' && this.cookieService.check('idtoken') ? true : false;
})
);
return observable;
}

}