started using environment variables

This commit is contained in:
X4Lo committed 2024-06-04 02:26:18 +01:00
1 parent c9c7a92012
commit 8958ead210
12 files changed
+44 -23

No files matched your search

@@ -4,6 +4,7 @@ import { Observable, from, map, of, switchMap, toArray } from 'rxjs';
import { Entry } from '../../shared/models/entry.model';
import { EntryId } from '../../shared/models/entryId.model';
import { EntryRating } from '../../shared/models/entryRating.model';
import { environment } from '../../../environments/environment.prod';
@Injectable({
providedIn: 'root',
@@ -14,8 +15,8 @@ export class TmdbService {
constructor(private http: HttpClient) {}
// private apiUrl = environment.apiBaseUrl;
private tmdb_apiUrl = 'https://api.themoviedb.org/3';
private tmdb_apiKey = '5323ef3dc430df54dcb9e58c37fd22bb';
private tmdb_apiUrl = environment.TMDB_API_URL;
private tmdb_apiKey = environment.TMDB_API_KEY;
fetchdata(endPoint: string): Observable<any> {
if (this.cach[endPoint]) {
@@ -34,9 +35,6 @@ export class TmdbService {
getEntriesUsingEndPoint(endPoint: string): Observable<Entry[]> {
return this.fetchdata(endPoint).pipe(
// map((response) =>
// response.results.map((movie: any) => this.adaptMovieToEntry(movie))
// )
map((response) => {
// Check if the data is from cache and has `exist` property
if (response.exist) {