CS5500-S-2023 / team-bear

team-bear created by GitHub Classroom
0 stars 0 forks source link

Store created listing under a user, where the user is stored in a mongoDB database. #83

Closed tsanevp closed 1 year ago

tsanevp commented 1 year ago

The original implementation of this was done in #8. However, once MongoDb was set up later, it was realized that MongoDB could not deserialize List.

This was then fixed in #13 since we also set up MongoDB. It was changed so a List was passed to the controller and in the controller methods would build a DBObject and store it in MongoDB. The controller would also get the DBObject, build a List, and return it to the commands. Soon after, this implementation was realized to be wrong since we 1. don't want the controller handling any discord logic 2. don't want the controller to be coupled to MongoDB.

After this huge red flag was pointed out to me by Alex, these two problems were fixed in #58. This PR finally decoupled Discord from our controllers, leading to the first step in making our code testable. We also decoupled MongoDB from our controllers by making Listing object storable in User.