Skip to content

Commit

Permalink
Updated api events controller and .env file
Browse files Browse the repository at this point in the history
  • Loading branch information
AliciaMoses authored Mar 5, 2023
1 parent d212212 commit eb916bd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
API_KEY = 7elxdku9GGG5k8j0Xm8KWdANDgecHMV0
API_KEY =
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#dependencies
node_modules/
.env
4 changes: 2 additions & 2 deletions server/controllers/api_events.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit eb916bd

Please sign in to comment.