mattadlerpdx / rezcamper

0 stars 1 forks source link

After Search, campsite is located in system #22

Closed kiraoyd closed 1 year ago

kiraoyd commented 1 year ago

For the situation where a campsite is searched and found to be in our system.....

...write functionality that updates that Campsite's info (object? JSON? we have to decide) to include the email from the AlertRequestInto object, for the dates selected in the AlertRequestInfo object.

mattadlerpdx commented 1 year ago

So update campsite info will be a function in Class Recieve Post ?

kiraoyd commented 1 year ago

I don't think so, as the RecievePost class exists only at the controller level. All it does (as of now) is intake a post, validate it, and make an AlertRequestInfo object. I think I was thinking here more about the functionality to update the respective campsite that's stored in our database file (all the campsites we monitor and their associated emails). Like "ok we have a valid request, heres the object containing the email, campsite, and dates. Search our database file for the campsite, if we find it, add the email from the request object to the list of emails held for that campsite." That way once we write the functionality to say, send out some emails, each campsite in our file has all the emails associated with every received post. I'm not sure that made any more sense, so please let me know if it didn't.

mattadlerpdx commented 1 year ago

Like Below?

Class Campsite: self.CampsiteName = campsite

//dictionary list of uniqueEmail Keys and dates as values. 
self.Emails = { } 

            self.Email = { UniqueEmail: [ 2021-11-2, 2022-12-3 ]}
mattadlerpdx commented 1 year ago

or maybe there should just tbe 3 funcitons:

def updateEmails() def updateDates() def updateName()