mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 02:11:11 -05:00
Merge branch 'master' into split-sms-and-retry
This commit is contained in:
@@ -139,6 +139,14 @@ def dao_get_template_statistics_for_service(service_id, limit_days=None):
|
||||
desc(TemplateStatistics.updated_at)).all()
|
||||
|
||||
|
||||
def dao_get_template_statistics_for_template(template_id):
|
||||
return TemplateStatistics.query.filter(
|
||||
TemplateStatistics.template_id == template_id
|
||||
).order_by(
|
||||
desc(TemplateStatistics.updated_at)
|
||||
).all()
|
||||
|
||||
|
||||
@transactional
|
||||
def dao_create_notification(notification, notification_type):
|
||||
if notification.job_id:
|
||||
@@ -332,6 +340,10 @@ def get_notification_by_id(notification_id):
|
||||
return Notification.query.filter_by(id=notification_id).first()
|
||||
|
||||
|
||||
def get_notifications(filter_dict=None):
|
||||
return _filter_query(Notification.query, filter_dict=filter_dict)
|
||||
|
||||
|
||||
def get_notifications_for_service(service_id,
|
||||
filter_dict=None,
|
||||
page=1,
|
||||
|
||||
Reference in New Issue
Block a user