mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-19 14:08:47 -04:00
Rename function in service utils
To reflect the new name of the feature. squash! Rename function in service utils Rename function, variable and argument names in service utils
This commit is contained in:
@@ -78,8 +78,8 @@ def check_template_is_active(template):
|
||||
message="Template has been deleted")
|
||||
|
||||
|
||||
def service_can_send_to_recipient(send_to, key_type, service, allow_whitelisted_recipients=True):
|
||||
if not service_allowed_to_send_to(send_to, service, key_type, allow_whitelisted_recipients):
|
||||
def service_can_send_to_recipient(send_to, key_type, service, allow_guest_list_recipients=True):
|
||||
if not service_allowed_to_send_to(send_to, service, key_type, allow_guest_list_recipients):
|
||||
if key_type == KEY_TYPE_TEAM:
|
||||
message = 'Can’t send to this recipient using a team-only API key'
|
||||
else:
|
||||
@@ -109,11 +109,11 @@ def check_if_service_can_send_files_by_email(service_contact_link, service_id):
|
||||
)
|
||||
|
||||
|
||||
def validate_and_format_recipient(send_to, key_type, service, notification_type, allow_whitelisted_recipients=True):
|
||||
def validate_and_format_recipient(send_to, key_type, service, notification_type, allow_guest_list_recipients=True):
|
||||
if send_to is None:
|
||||
raise BadRequestError(message="Recipient can't be empty")
|
||||
|
||||
service_can_send_to_recipient(send_to, key_type, service, allow_whitelisted_recipients)
|
||||
service_can_send_to_recipient(send_to, key_type, service, allow_guest_list_recipients)
|
||||
|
||||
if notification_type == SMS_TYPE:
|
||||
international_phone_info = check_if_service_can_send_to_number(service, send_to)
|
||||
|
||||
Reference in New Issue
Block a user