use env variables instead of json
	
		
			
	
		
	
	
		
			
				
	
				Gitea/movie-explorer/pipeline/head This commit looks good
				
					Details
				
			
		
	
				
					
				
			
				
	
				Gitea/movie-explorer/pipeline/head This commit looks good
				
					Details
				
			
		
	This commit is contained in:
		
							parent
							
								
									90c4db1431
								
							
						
					
					
						commit
						c21fc517cc
					
				| 
						 | 
					@ -5,7 +5,7 @@
 | 
				
			||||||
  "type": "module",
 | 
					  "type": "module",
 | 
				
			||||||
  "scripts": {
 | 
					  "scripts": {
 | 
				
			||||||
    "dev": "vite",
 | 
					    "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",
 | 
					    "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
 | 
				
			||||||
    "preview": "vite preview"
 | 
					    "preview": "vite preview"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,12 +1,11 @@
 | 
				
			||||||
import axios from 'axios'
 | 
					import axios from 'axios'
 | 
				
			||||||
import * as auth from '../auth.json';
 | 
					 | 
				
			||||||
import { Movie } from './movie-wall';
 | 
					import { Movie } from './movie-wall';
 | 
				
			||||||
import { Config } from '../App';
 | 
					import { Config } from '../App';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const tmdb = axios.create({
 | 
					const tmdb = axios.create({
 | 
				
			||||||
  baseURL: `https://api.themoviedb.org/3/movie`,
 | 
					  baseURL: `https://api.themoviedb.org/3/movie`,
 | 
				
			||||||
  headers: {
 | 
					  headers: {
 | 
				
			||||||
    Authorization: 'Bearer ' + auth.token,
 | 
					    Authorization: 'Bearer ' + import.meta.env.local.VITE_TOKEN,
 | 
				
			||||||
    'Content-Type': 'application/json',
 | 
					    'Content-Type': 'application/json',
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue