TimPrimmer / parktime-app

Group project for UT Full Stack Web Dev bootcamp
3 stars 3 forks source link

fixed fetch request, added utility function to get specific park info #101

Closed TimPrimmer closed 3 years ago

TimPrimmer commented 3 years ago

if you type "npm run seed" it will now pull all the park info and generate a parks.json file at data/parks.json (and its formatted to have the parks array named "parks" instead of "data")

if it doesnt work you might need to make the data folder first

also added a utility option to find a specific parks info, example on how to use:

const parkUtil= require('./utils/park-info.js');

let info = parkUtil.getParkData("3B8307B3-54AB-4E5F-ACBC-8DECB98AD5F1"); console.log(info); // would show all the specific parks info

to get the park id, I will eventually make some api routes to get the park id via the database id