Fixed issues logging in.
The API call to /api/bcloud/update-subscription is now performed via the SDK, to ensure proper authentication. Also streamlined some other code.
This commit is contained in:
@@ -102,12 +102,12 @@ def update_subscription():
|
||||
|
||||
if grant_subscriber != is_subscriber:
|
||||
action = 'grant' if grant_subscriber else 'revoke'
|
||||
log.info('%sing subscriber role to user %s', action, user_id)
|
||||
log.info('%sing subscriber role to user %s (Blender ID email %s)', action, user_id, email)
|
||||
service.do_badger(action, 'subscriber', user_id=user_id)
|
||||
|
||||
if grant_demo != is_demo:
|
||||
action = 'grant' if grant_demo else 'revoke'
|
||||
log.info('%sing demo role to user %s', action, user_id)
|
||||
log.info('%sing demo role to user %s (Blender ID email %s)', action, user_id, email)
|
||||
service.do_badger(action, 'demo', user_id=user_id)
|
||||
|
||||
return '', 204
|
||||
|
Reference in New Issue
Block a user