Use the notification types enum for the notifications.notification_type.

Reuse EMAIL_TYPE in template_types and notification_types.
This commit is contained in:
Rebecca Law
2016-06-29 11:50:54 +01:00
parent 60e159e3c0
commit 25db1bce74
6 changed files with 35 additions and 27 deletions

View File

@@ -4,6 +4,8 @@ from flask import current_app
from app import notify_celery
from requests import request, RequestException, HTTPError
from app.models import SMS_TYPE
temp_fail = "07833333333"
perm_fail = "07822222222"
delivered = "07811111111"
@@ -21,7 +23,7 @@ def send_sms_response(provider, reference, to):
else:
headers = {"Content-type": "application/x-www-form-urlencoded"}
body = firetext_callback(reference, to)
make_request('sms', provider, body, headers)
make_request(SMS_TYPE, provider, body, headers)
@notify_celery.task(name="send-ses-response")