added check accepted or not before sending request

This commit is contained in:
2022-07-25 10:53:29 +02:00
parent 418699635e
commit 3160fefdab
3 changed files with 68 additions and 3 deletions
+11
View File
@@ -41,6 +41,17 @@ class MongoDbManager:
except Exception as Error:
self.logger.info(Error)
def get_all_accepted_appointments(self) -> list:
collection_name = ACCEPTED_APPOINTMENT_LIST
appointment_list_contacts = []
try:
collection_to_use = self.db[collection_name]
for document in collection_to_use.find():
appointment_list_contacts.append(AcceptedAppointmentPojo.from_firestore_dict(document))
except Exception as error:
self.logger.info(error)
return appointment_list_contacts
def insert_captcha_error_contact(self, contact: ContactPojo):
day = str(datetime.date.today())
collection_name = CAPTCHA_ERROR_COLLECTION_PREFIX + day