mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 02:42:26 -05:00
Merge pull request #184 from alphagov/user-sms-email-code-endpoints
Updated the api_client call to send_verify_code
This commit is contained in:
@@ -65,10 +65,8 @@ class UserApiClient(BaseAPIClient):
|
||||
return None
|
||||
|
||||
def send_verify_code(self, user_id, code_type, to=None):
|
||||
data = {'code_type': code_type}
|
||||
if to:
|
||||
data['to'] = to
|
||||
endpoint = '/user/{}/code'.format(user_id)
|
||||
data = {'to': to} if to else {}
|
||||
endpoint = '/user/{0}/{1}-code'.format(user_id, code_type)
|
||||
resp = self.post(endpoint, data=data)
|
||||
|
||||
def check_verify_code(self, user_id, code, code_type):
|
||||
|
||||
@@ -12,6 +12,6 @@ credstash==1.8.0
|
||||
boto3==1.2.3
|
||||
Pygments==2.0.2
|
||||
|
||||
git+https://github.com/alphagov/notifications-python-client.git@0.2.5#egg=notifications-python-client==0.2.5
|
||||
git+https://github.com/alphagov/notifications-python-client.git@0.2.5#egg=notifications-python-client==0.2.7
|
||||
|
||||
git+https://github.com/alphagov/notifications-utils.git@0.1.0#egg=notifications-utils==0.1.0
|
||||
|
||||
Reference in New Issue
Block a user