Remove unnecessary structs

This commit is contained in:
first last 2021-05-20 13:59:56 -04:00
commit 910f6380fc
2 changed files with 3 additions and 8 deletions

View file

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

View file

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