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:
2017-05-05 10:29:16 +02:00
parent 10a40ddabd
commit 379d40837b
3 changed files with 17 additions and 9 deletions

View File

@@ -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