Skip to content

Commit

Permalink
chore: store the api key in .env
Browse files Browse the repository at this point in the history
  • Loading branch information
iqbalpa committed Jul 11, 2024
1 parent a19fa71 commit b93258d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
API_KEY=<your_tmdb_api_key>
3 changes: 1 addition & 2 deletions src/api/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { Movie } from '@/constant/movie';
import { DetailMovie } from '@/constant/detailMovie';

const BASE_URL = 'https://api.themoviedb.org/3/';
const API_KEY =
'eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiI1MzM0Njg0NjI2OTg1ODI3OTE1NzMyNWY5OTAxZmU4ZCIsIm5iZiI6MTcyMDU4OTg3MC4wMzYzNDIsInN1YiI6IjY2OGUxY2JlMzA0OTRhNmE2OTMyYzE3MCIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.jkIXGMw1WWmtEO9XDryk4R5gP35WQIZHQ8uGIH-QgnM';
const API_KEY = process.env.API_KEY

const getAllMovies = async (currentPage: number): Promise<Movie[]> => {
const res = await axios.get(
Expand Down

0 comments on commit b93258d

Please sign in to comment.