diff --git a/.env b/.env index e8cf23b7..9c7dd497 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -API_KEY = 7elxdku9GGG5k8j0Xm8KWdANDgecHMV0 \ No newline at end of file +API_KEY = \ No newline at end of file diff --git a/.gitignore b/.gitignore index 58b0a5ed..dca6799f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ #dependencies node_modules/ +.env \ No newline at end of file diff --git a/server/controllers/api_events.js b/server/controllers/api_events.js index 2ea28f77..623f6204 100644 --- a/server/controllers/api_events.js +++ b/server/controllers/api_events.js @@ -7,7 +7,7 @@ const APIEventsController = { addEvents: async () => { try { const response = await axios.get( - "https://app.ticketmaster.com/discovery/v2/events?apikey={apikey}&locale=*&size=10&city=London&countryCode=GB" + `https://app.ticketmaster.com/discovery/v2/events?apikey=${apikey}&locale=*&size=10&city=London&countryCode=GB` ); const events = response.data._embedded.events; @@ -44,7 +44,7 @@ const APIEventsController = { apiEvent.lastIterated = new Date(); await apiEvent.save(); - const response = await axios.get(`https://app.ticketmaster.com/discovery/v2/events/${apiEvent.ticketMasterId}?apikey=rmiukm4AAeGFtQ2ptdf0HcMLRGLdOGnb&locale=*`); + const response = await axios.get(`https://app.ticketmaster.com/discovery/v2/events/${apiEvent.ticketMasterId}?apikey=${apikey}&locale=*`); const eventData = response.data;