mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-03 15:41:06 -04:00
Revert "use new activate endpoint"
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user