def get_donor_recommendations(essential_ids): collection = DonateService.get_collection() items_filter = [{ "items.itemId": essential_id } for essential_id in essential_ids] filters = {} if items_filter: filters["$or"] = items_filter return BaseMongo.find_all(collection, filters)
def get_all(): collection = VolunteersService.get_collection() return BaseMongo.find_all(collection)
def get_all_reports_for_the_issue(issue_id): collection = IssueReportsService.get_collection() filters = {'issue_id': issue_id} return BaseMongo.find_all(collection, filters)
def get_all_issues_based_on_coordinates(coordinate): essential_collection = IssuesService.get_collection() filters = IssuesService.__build_location_filters(coordinate) return BaseMongo.find_all(essential_collection, filters)
def get_all(): essential_collection = IssuesService.get_collection() return BaseMongo.find_all(essential_collection)
def get_all_acknowledgements_for_the_volunteer(volunteer_id): collection = IssuesAcknowledgementsService.get_collection() filters = {'volunteer_id': volunteer_id} return BaseMongo.find_all(collection, filters)
def get_all_acknowledgements_for_the_issue(issue_id): collection = IssuesAcknowledgementsService.get_collection() filters = {'issue_id': issue_id} return BaseMongo.find_all(collection, filters)
def get_all_plus_ones_for_the_issue(issue_id): collection = IssuesPlusOneService.get_collection() filters = {'issue_id': issue_id} return BaseMongo.find_all(collection, filters)
def get_all(): collection = ReportersService.get_collection() return BaseMongo.find_all(collection)
def get_all(): collection = VictimsService.get_collection() return BaseMongo.find_all(collection)