add method to get accepted list

This commit is contained in:
2023-01-14 13:05:14 +01:00
parent 8e29c462fd
commit 76f2101035
+11
View File
@@ -83,6 +83,17 @@ class MongoDbManager:
self.logger.info(error) self.logger.info(error)
return appointment_list_contacts 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: def get_destination_emails(self) -> list:
collection_name = DESTINATION_EMAIL_LIST collection_name = DESTINATION_EMAIL_LIST
email_list = [] email_list = []