mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
Updated to send email through the client send_email.
This commit is contained in:
@@ -63,7 +63,7 @@ class UKMobileNumber(StringField):
|
||||
return
|
||||
# TODO implement in the render field method.
|
||||
# API's require no spaces in the number
|
||||
#self.data = '+44 7{} {} {}'.format(*re.findall('...', self.data))
|
||||
# self.data = '+44 7{} {} {}'.format(*re.findall('...', self.data))
|
||||
self.data = '+447{}{}{}'.format(*re.findall('...', self.data))
|
||||
|
||||
|
||||
|
||||
@@ -128,8 +128,6 @@ class NotificationsAdminAPIClient(NotificationsAPIClient):
|
||||
message,
|
||||
job_id=None,
|
||||
description=None):
|
||||
print("{0} {1} {2} {3}".format(
|
||||
mobile_number, message, job_id, description))
|
||||
self.send_sms_notification(mobile_number, message)
|
||||
|
||||
def send_email(self,
|
||||
@@ -139,5 +137,4 @@ class NotificationsAdminAPIClient(NotificationsAPIClient):
|
||||
subject,
|
||||
job_id=None,
|
||||
description=None):
|
||||
print("{0} {1} {2} {3} {4} {5}".format(
|
||||
email_address, message, from_address, subject, job_id, description))
|
||||
self.send_email_notification(email_address, message, from_address, subject)
|
||||
|
||||
@@ -22,7 +22,7 @@ class UserApiClient(BaseAPIClient):
|
||||
"password": password
|
||||
}
|
||||
user_data = self.post("/user", data)
|
||||
return User(user_data, max_failed_login_count=self.user_max_failed_login_count)
|
||||
return User(user_data['data'], max_failed_login_count=self.user_max_failed_login_count)
|
||||
|
||||
|
||||
class User(object):
|
||||
|
||||
Reference in New Issue
Block a user