diff --git a/storyboard/api/v1/auth.py b/storyboard/api/v1/auth.py index 2e5fc711..93a347f3 100644 --- a/storyboard/api/v1/auth.py +++ b/storyboard/api/v1/auth.py @@ -37,7 +37,7 @@ class AuthController(rest.RestController): _custom_actions = { "authorize": ["GET"], - "authorize_return": ["GET"], + "authorize_return": ["GET", "POST"], "token": ["POST"], } diff --git a/storyboard/notifications/notification_hook.py b/storyboard/notifications/notification_hook.py index aab541c6..152292fb 100644 --- a/storyboard/notifications/notification_hook.py +++ b/storyboard/notifications/notification_hook.py @@ -88,8 +88,8 @@ class NotificationHook(hooks.PecanHook): # On a POST method, the server has assigned an ID to the resource, # so we should be getting it from the resource rather than the URL. if state.request.method == 'POST': - response_body = json.loads(response.body) - if response_body: + if response.body: + response_body = json.loads(response.body) if not subresource: resource_id = response_body.get('id') elif subresource == 'comment':