mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-19 17:11:54 -05:00
Created an endpoint to test how the incoming messages from MMG will work.
So this just prints the response to logs, removing the phone number first. Then returns the requested RECEIVED.
This commit is contained in:
@@ -123,6 +123,7 @@ def init_app(app):
|
||||
url_for('notifications.process_ses_response'),
|
||||
url_for('notifications.process_firetext_response'),
|
||||
url_for('notifications.process_mmg_response'),
|
||||
url_for('notifications.receive_mmg_sms'),
|
||||
url_for('status.show_delivery_status'),
|
||||
url_for('spec.get_spec')
|
||||
]
|
||||
|
||||
@@ -49,6 +49,15 @@ from app.errors import (
|
||||
register_errors(notifications)
|
||||
|
||||
|
||||
@notifications.route('/notifications/sms/receive/mmg', methods=['POST'])
|
||||
def receive_mmg_sms():
|
||||
post_data = request.get_json()
|
||||
post_data.pop('MSISDN', None)
|
||||
current_app.logger.info("POST form data: {}".format(post_data))
|
||||
|
||||
return "RECEIVED"
|
||||
|
||||
|
||||
@notifications.route('/notifications/email/ses', methods=['POST'])
|
||||
def process_ses_response():
|
||||
client_name = 'SES'
|
||||
|
||||
Reference in New Issue
Block a user