EventHopper / EHServerSide

Server-Side functionality including REST API, hosting scripts & client-server modules
0 stars 0 forks source link

Fixed event saving Mongo issue #98

Closed kylermintah closed 4 years ago

kylermintah commented 4 years ago

Fixes #92 - Mongo Save Event Errors (This fixes half of the issue detailed in #92)

A Trivial Fix - stopped using new Event and just saved the incoming event data in upsert.

may need to do an additional check to ensure conformation to EventSchema. Can do this by adding a preliminary function to create a new Event out of the incoming data and ensure no errors are thrown before using the data for upsertion for example.

@masterford be advised I had to make the listAll function in the Event controller public as the routes.config functions were calling list (which has now been deleted I see in favour of listAll). If you want to keep listAll private let me know and we'll find a compromise

batchema commented 4 years ago

We will talk more about this issue in the meeting. We absolutely need to solve this now or it will be a pain for some time. We need to fully grasp the API