diff --git a/.gitignore b/.gitignore index a0bce6e..e6715c3 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,4 @@ dist-ssr *.sln *.sw? src/conf.js -src/auth.json +.env diff --git a/package.json b/package.json index c54994f..493888f 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "vite", - "build": "tsc && touch src/auth.json && vite build --base=/movie-explorer/", + "build": "tsc && vite build --base=/movie-explorer/", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" }, diff --git a/src/objects/tmdb.tsx b/src/objects/tmdb.tsx index ffee17c..2f7cab0 100644 --- a/src/objects/tmdb.tsx +++ b/src/objects/tmdb.tsx @@ -1,12 +1,11 @@ import axios from 'axios' -import * as auth from '../auth.json'; import { Movie } from './movie-wall'; import { Config } from '../App'; const tmdb = axios.create({ baseURL: `https://api.themoviedb.org/3/movie`, headers: { - Authorization: 'Bearer ' + auth.token, + Authorization: 'Bearer ' + import.meta.env.VITE_TOKEN, 'Content-Type': 'application/json', } })