Fix bug with send_verify_code not including the to field.

This commit is contained in:
Nicholas Staples
2016-02-22 12:33:59 +00:00
parent b4ddcaa9b1
commit 980c01e10c
7 changed files with 11 additions and 11 deletions

View File

@@ -64,8 +64,8 @@ class UserApiClient(BaseAPIClient):
return user[0]
return None
def send_verify_code(self, user_id, code_type, to=None):
data = {'to': to} if to else {}
def send_verify_code(self, user_id, code_type, to):
data = {'to': to}
endpoint = '/user/{0}/{1}-code'.format(user_id, code_type)
resp = self.post(endpoint, data=data)