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:
Adam Shimali
2016-02-22 10:27:10 +00:00
2 changed files with 3 additions and 5 deletions

View File

@@ -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):

View File

@@ -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