mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-09 12:49:48 -04:00
Now done.
This commit is contained in:
@@ -13,8 +13,6 @@ def add_notification_to_queue(service_id, template_id, type_, notification):
|
|||||||
message_id = str(uuid.uuid4())
|
message_id = str(uuid.uuid4())
|
||||||
serializer = URLSafeSerializer(current_app.config.get('SECRET_KEY'))
|
serializer = URLSafeSerializer(current_app.config.get('SECRET_KEY'))
|
||||||
encrypted = serializer.dumps(notification, current_app.config.get('DANGEROUS_SALT'))
|
encrypted = serializer.dumps(notification, current_app.config.get('DANGEROUS_SALT'))
|
||||||
print("add_notification_to_queue")
|
|
||||||
print(type_)
|
|
||||||
q.send_message(MessageBody=encrypted,
|
q.send_message(MessageBody=encrypted,
|
||||||
MessageAttributes={'type': {'StringValue': type_, 'DataType': 'String'},
|
MessageAttributes={'type': {'StringValue': type_, 'DataType': 'String'},
|
||||||
'message_id': {'StringValue': message_id, 'DataType': 'String'},
|
'message_id': {'StringValue': message_id, 'DataType': 'String'},
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ def send_user_code(user_id):
|
|||||||
'from_address': 'notify@digital.cabinet-office.gov.uk',
|
'from_address': 'notify@digital.cabinet-office.gov.uk',
|
||||||
'subject': 'Verification code',
|
'subject': 'Verification code',
|
||||||
'body': secret_code}
|
'body': secret_code}
|
||||||
add_notification_to_queue(api_user['client'], 'admin', 'sms', notification)
|
add_notification_to_queue(api_user['client'], 'admin', 'email', notification)
|
||||||
notify_alpha_client.send_email(
|
notify_alpha_client.send_email(
|
||||||
email,
|
email,
|
||||||
secret_code,
|
secret_code,
|
||||||
|
|||||||
Reference in New Issue
Block a user