mattadlerpdx / rezcamper

0 stars 1 forks source link

added json interface #30

Closed mattadlerpdx closed 1 year ago

mattadlerpdx commented 1 year ago

what do y'all think of the files below? what can be added/removed?

mattadlerpdx commented 1 year ago
  1. when you say iterate do you mean our json file has multiple campsite objects? i was under impression that we only have one campsite obj? if not, then i can adjust json file and yes, iterate.
  2. really the names of functions should be CRUD(create, read, update delete) bc this is interface for database, not making types of requests, right?
kiraoyd commented 1 year ago

I think the backend file stores multiple Campsites, but our MVP is just going to handle processing a single incoming Request (Post).

mattadlerpdx commented 1 year ago

so does the JSON file i created look good? or should we have multiple campsites in file?

mattadlerpdx commented 1 year ago

like this?

{"arrayOfJsonObjects":[ { "email": "matt@gmail.com", "campsite": "Yellowstone", "date": "2023-12-13"}, { "email": "kira@gmail.com", "campsite": "craterLake", "date": "2024-09-14"} ] }

kiraoyd commented 1 year ago

Yeah, that looks exactly like what I was thinking. And if you write the findCampsite method to iterate, it'll work if there's just one object in the list, or many.

mattadlerpdx commented 1 year ago

i updated this branch, not sure if this PR reflects those changes

kiraoyd commented 1 year ago

Yep, the recent commit is in this PR. Thanks! Merging in now.