remove outdated validatesns library and replace with maintainable code

This commit is contained in:
jimmoffet
2022-09-20 20:11:09 -07:00
parent f1aec54665
commit a03de0dd56
10 changed files with 155 additions and 32 deletions

View File

@@ -49,4 +49,4 @@ def create_complaint_callback_data(complaint, notification, service_callback_api
"service_callback_api_bearer_token": service_callback_api.bearer_token,
}
return encryption.encrypt(data)
return encryption.encrypt(data)

View File

@@ -17,7 +17,7 @@ from app.models import Complaint
from app.notifications.callbacks import create_complaint_callback_data
def _determine_notification_bounce_type(ses_message):
def determine_notification_bounce_type(ses_message):
notification_type = ses_message["notificationType"]
if notification_type in ["Delivery", "Complaint"]:
return notification_type
@@ -51,7 +51,7 @@ def _determine_provider_response(ses_message):
def get_aws_responses(ses_message):
status = _determine_notification_bounce_type(ses_message)
status = determine_notification_bounce_type(ses_message)
base = {
"Permanent": {