Remove unnecessary structs

pull/4199/head
first last 4 years ago
parent cd7db8bb44
commit 910f6380fc

@ -2,8 +2,3 @@
id: number; id: number;
name: string; name: string;
} }
export interface IMovieDbGenre {
id: number;
name: string;
}

@ -4,7 +4,7 @@ import { Injectable, Inject } from "@angular/core";
import { empty, Observable, throwError } from "rxjs"; import { empty, Observable, throwError } from "rxjs";
import { catchError } from "rxjs/operators"; import { catchError } from "rxjs/operators";
import { IMovieDbGenre, IMovieDbKeyword } from "../../interfaces"; import { IMovieDbKeyword } from "../../interfaces";
import { ServiceHelpers } from "../service.helpers"; import { ServiceHelpers } from "../service.helpers";
@Injectable() @Injectable()
@ -23,7 +23,7 @@ export class TheMovieDbService extends ServiceHelpers {
.pipe(catchError((error: HttpErrorResponse) => error.status === 404 ? empty() : throwError(error))); .pipe(catchError((error: HttpErrorResponse) => error.status === 404 ? empty() : throwError(error)));
} }
public getGenres(media: string): Observable<IMovieDbGenre[]> { public getGenres(media: string): Observable<IMovieDbKeyword[]> {
return this.http.get<IMovieDbGenre[]>(`${this.url}/Genres/${media}`, { headers: this.headers }) return this.http.get<IMovieDbKeyword[]>(`${this.url}/Genres/${media}`, { headers: this.headers })
} }
} }

Loading…
Cancel
Save