mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 08:51:30 -05:00
- Table to store meta data for the emergency contact list for a service. - Endpoint for fetching contact lists for service - Endpoint for saving contact list for service. The list will be stored in S3. The service will then be able to send emergency announcements to staff.
17 lines
406 B
Python
17 lines
406 B
Python
from app import db
|
|
from app.models import ServiceContactList
|
|
|
|
|
|
def dao_get_contact_lists(service_id):
|
|
contact_lists = ServiceContactList.query.filter_by(
|
|
service_id=service_id
|
|
).order_by(
|
|
ServiceContactList.created_at.desc()
|
|
)
|
|
return contact_lists.all()
|
|
|
|
|
|
def save_service_contact_list(service_contact_list):
|
|
db.session.add(service_contact_list)
|
|
db.session.commit()
|