also alwyas allow cancelPeering

This commit is contained in:
j 2016-01-16 18:51:32 +05:30
parent cfbc90b50b
commit ad45b32fdc

View file

@ -77,7 +77,8 @@ def api_call(action, user_id, args):
with db.session(): with db.session():
u = user.models.User.get(user_id) u = user.models.User.get(user_id)
if action in ( if action in (
'requestPeering', 'acceptPeering', 'rejectPeering', 'removePeering' 'requestPeering', 'acceptPeering', 'rejectPeering',
'removePeering', 'cancelPeering'
) or (u and u.peered): ) or (u and u.peered):
content = getattr(nodeapi, 'api_' + action)(user_id, *args) content = getattr(nodeapi, 'api_' + action)(user_id, *args)
else: else: