mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
Updated the api_client call to send_verify_code
The api has now has an user/<user_id>/email-code and user/<user_id>/sms-code This commit requires an update to the python-client. Make sure the PR for that version has been merged first and the tag push using scripts/push_tag.sh
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):
|
||||
|
||||
Reference in New Issue
Block a user