mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -05:00
Added an optional parameter in the form for POST /v2/notifications/sms and /service/<service_id>/send-notification to pass in the SMS sender id.
The send_sms_to_provider still needs to use the SMS sender being passed in to the POST. As part of https://www.pivotaltracker.com/story/show/152106587
This commit is contained in:
@@ -43,8 +43,8 @@ from app.models import (
|
||||
NOTIFICATION_TECHNICAL_FAILURE,
|
||||
NOTIFICATION_TEMPORARY_FAILURE,
|
||||
NOTIFICATION_PERMANENT_FAILURE,
|
||||
NOTIFICATION_SENT
|
||||
)
|
||||
NOTIFICATION_SENT,
|
||||
NotificationSmsSender)
|
||||
|
||||
from app.dao.dao_utils import transactional
|
||||
from app.statsd_decorators import statsd
|
||||
@@ -650,3 +650,12 @@ def dao_get_last_notification_added_for_job_id(job_id):
|
||||
).first()
|
||||
|
||||
return last_notification_added
|
||||
|
||||
|
||||
@transactional
|
||||
def dao_create_notification_sms_sender_mapping(notification_id, sms_sender_id):
|
||||
notification_to_sms_sender = NotificationSmsSender(
|
||||
notification_id=notification_id,
|
||||
service_sms_sender_id=sms_sender_id
|
||||
)
|
||||
db.session.add(notification_to_sms_sender)
|
||||
|
||||
Reference in New Issue
Block a user