mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 17:31:14 -05:00
Ensure that the primary provider is used in all tasks
This commit is contained in:
@@ -28,8 +28,17 @@ class Clients(object):
|
||||
for client in email_clients:
|
||||
self.email_clients[client.name] = client
|
||||
|
||||
def sms_client(self, name):
|
||||
def get_sms_client(self, name):
|
||||
return self.sms_clients.get(name)
|
||||
|
||||
def email_client(self, name):
|
||||
def get_email_client(self, name):
|
||||
return self.email_clients.get(name)
|
||||
|
||||
def get_client_by_name_and_type(self, name, notification_type):
|
||||
assert notification_type in ['email', 'sms']
|
||||
|
||||
if notification_type == 'email':
|
||||
return self.get_email_client(name)
|
||||
|
||||
if notification_type == 'sms':
|
||||
return self.get_sms_client(name)
|
||||
|
||||
Reference in New Issue
Block a user