Revert "use new activate endpoint"

This commit is contained in:
Leo Hemsted
2017-11-09 14:55:08 +00:00
committed by GitHub
parent 51e91bc627
commit b9eca67b0d
2 changed files with 3 additions and 21 deletions

View File

@@ -148,8 +148,9 @@ class UserApiClient(NotifyAdminAPIClient):
def activate_user(self, user):
if user.state == 'pending':
url = "/user/{}/activate".format(user.id)
user_data = self.post(url)
user.state = 'active'
url = "/user/{}".format(user.id)
user_data = self.post(url, data={'state': 'active'})
return User(user_data['data'], max_failed_login_count=self.max_failed_login_count)
else:
return user