Skip to content

Commit 1ccac53

Browse files
author
Rodrigo Lins
committed
fix TTA-83: Sonarcloud fix
1 parent c56d61c commit 1ccac53

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/app/modules/login/login.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { SocialAuthService, SocialUser } from 'angularx-social-login';
77
import { environment } from 'src/environments/environment';
88
import { EnvironmentType } from 'src/environments/enum';
99
import { LoginService } from './services/login.service';
10-
import { tap } from 'rxjs/operators';
10+
1111
@Component({
1212
selector: 'app-login',
1313
templateUrl: './login.component.html',

src/app/modules/login/services/azure.ad.b2c.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export class AzureAdB2CService {
100100

101101
isValidToken(token: string) {
102102
const body = { token };
103-
const observable = this.http.post(`${this.baseUrl}/validate-token`, body).pipe(
103+
return this.http.post(`${this.baseUrl}/validate-token`, body).pipe(
104104
map((response) => {
105105
const responseString = JSON.stringify(response);
106106
const responseJson = JSON.parse(responseString);
@@ -111,6 +111,5 @@ export class AzureAdB2CService {
111111
return isValid ? true : false;
112112
})
113113
);
114-
return observable;
115114
}
116115
}

src/app/modules/login/services/login.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export class LoginService {
8888

8989
isValidToken(token: string) {
9090
const body = { token };
91-
const observable = this.http.post(`${this.baseUrl}/validate-token`, body).pipe(
91+
return this.http.post(`${this.baseUrl}/validate-token`, body).pipe(
9292
map((response) => {
9393
const responseString = JSON.stringify(response);
9494
const responseJson = JSON.parse(responseString);
@@ -98,7 +98,6 @@ export class LoginService {
9898
return responseString !== '{}' && this.cookieService.check('idtoken') ? true : false;
9999
})
100100
);
101-
return observable;
102101
}
103102

104103
}

0 commit comments

Comments
 (0)