Removed the use of any and enabled the rule in eslint.
Now according to me the conversion is final. Testing is required.
This commit is contained in:
@ -83,7 +83,7 @@ export class AuthService {
|
||||
formData.append('otp', otp);
|
||||
formData.append('grant_type', 'password');
|
||||
return this.http
|
||||
.post<any>(loginUrl, formData)
|
||||
.post<{ access_token: string; token_type: string }>(loginUrl, formData)
|
||||
.pipe(map((u) => u.access_token))
|
||||
.pipe(map((u) => AuthService.parseJwt(u)))
|
||||
.pipe(
|
||||
@ -113,7 +113,7 @@ export class AuthService {
|
||||
|
||||
refreshToken() {
|
||||
return this.http
|
||||
.post<any>(refreshUrl, {})
|
||||
.post<{ access_token: string; token_type: string }>(refreshUrl, {})
|
||||
.pipe(map((u) => u.access_token))
|
||||
.pipe(map((u) => AuthService.parseJwt(u)))
|
||||
.pipe(
|
||||
|
||||
@ -8,12 +8,14 @@ describe('LoginComponent', () => {
|
||||
let component: LoginComponent;
|
||||
let fixture: ComponentFixture<LoginComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, RouterTestingModule],
|
||||
declarations: [LoginComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, RouterTestingModule],
|
||||
declarations: [LoginComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(LoginComponent);
|
||||
|
||||
@ -8,12 +8,14 @@ describe('LogoutComponent', () => {
|
||||
let component: LogoutComponent;
|
||||
let fixture: ComponentFixture<LogoutComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, RouterTestingModule],
|
||||
declarations: [LogoutComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, RouterTestingModule],
|
||||
declarations: [LogoutComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(LogoutComponent);
|
||||
|
||||
Reference in New Issue
Block a user