Skip to content

Commit

Permalink
remove unused methods & fix coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
CS6 committed Apr 1, 2021
1 parent 29d6576 commit 230801c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class PostCaptureTabComponent {
switchMap(isConnected =>
iif(
() => isConnected,
this.diaBackendSeriesRepository.fetchSeries$().pipe(pluck('results'))
this.diaBackendSeriesRepository.fetchSeries$.pipe(pluck('results'))
)
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mat-toolbar {
}

mat-grid-tile {
img {
ion-img {
width: 100%;
height: 100%;
object-fit: cover;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,23 @@ export class DiaBackendSeriesRepository {
private readonly authService: DiaBackendAuthService
) {}

fetchSeries$() {
return defer(() => this.authService.getAuthHeaders()).pipe(
concatMap(headers =>
this.httpClient.get<PaginatedResponse<DiaBackendSeries>>(
`${BASE_URL}/api/v2/series/`,
{
headers,
}
)
),
catchError((err: unknown) => {
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
if (err instanceof HttpErrorResponse && err.status === 404) {
return throwError(new NotFoundErrorResponse(err));
readonly fetchSeries$ = defer(() => this.authService.getAuthHeaders()).pipe(
concatMap(headers =>
this.httpClient.get<PaginatedResponse<DiaBackendSeries>>(
`${BASE_URL}/api/v2/series/`,
{
headers,
}
return throwError(err);
})
);
}
)
),
catchError((err: unknown) => {
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
if (err instanceof HttpErrorResponse && err.status === 404) {
return throwError(new NotFoundErrorResponse(err));
}
return throwError(err);
})
);
}

export interface DiaBackendSeries {
Expand Down

0 comments on commit 230801c

Please sign in to comment.