diff --git a/src/db/mongo_manager.py b/src/db/mongo_manager.py index 1913a16..a1c0fd1 100644 --- a/src/db/mongo_manager.py +++ b/src/db/mongo_manager.py @@ -83,6 +83,17 @@ class MongoDbManager: self.logger.info(error) return appointment_list_contacts + def get_all_accepted_appointments_for_day(self, day) -> list: + collection_name = ACCEPTED_APPOINTMENT_LIST + appointment_list_contacts = [] + try: + collection_to_use = self.db[collection_name] + for document in collection_to_use.find({"day": day}): + appointment_list_contacts.append(AcceptedAppointmentPojo.from_firestore_dict(document)) + except Exception as error: + self.logger.info(error) + return appointment_list_contacts + def get_destination_emails(self) -> list: collection_name = DESTINATION_EMAIL_LIST email_list = []