mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-05 02:41:14 -05:00
- Implemented persist_notification and send_notification_to_queue in the process_notifications module
- Not sure I want to create a new classmethod on Notifications to create from v2 request. Will take another look at that.
This commit is contained in:
@@ -54,3 +54,14 @@ post_sms_response = {
|
||||
},
|
||||
"required": ["id", "content", "uri", "template"]
|
||||
}
|
||||
|
||||
|
||||
def create_post_sms_response_from_notification(notification, content):
|
||||
return {"id": notification.id,
|
||||
"reference": None, # not yet implemented
|
||||
"content": content,
|
||||
"uri": "v2/notifications/{}".format(notification.id),
|
||||
"template": {"id": notification.template_id,
|
||||
"version": notification.template_version,
|
||||
"uri": "v2/templates/{}".format(notification.template_id)}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user