@must_have_permission('write')
@must_not_be_registration
@must_have_addon('forward', 'node')
def forward_config_put(auth, node_addon, **kwargs):
 try:
  node_addon.url = request.json['url']
  node_addon.label = request.json.get('label')
 except (KeyError, TypeError, ValueError):
  raise HTTPError(http.BAD_REQUEST)
 try:
  dirty_fields = node_addon.get_dirty_fields()
  node_addon.save()
 except ValidationValueError:
  raise HTTPError(http.BAD_REQUEST)
 if ('url' in dirty_fields):
  node_addon.owner.add_log(action='forward_url_changed', params=dict(node=node_addon.owner._id, project=node_addon.owner.parent_id, forward_url=node_addon.url), auth=auth, save=True)
 return {}

@ must_have_permission ( 'write' ) @ must_not_be_registration @ must_have_addon ( 'forward' , 'node' ) def forward_config_put ( auth , node_addon , ** kwargs ) : try : node_addon . url = request . json [ 'url' ] node_addon . label = request . json . get ( 'label' ) except ( KeyError , TypeError , ValueError ) : raise HTTPError ( http . BAD_REQUEST ) try : dirty_fields = node_addon . get_dirty_fields ( ) node_addon . save ( ) except ValidationValueError : raise HTTPError ( http . BAD_REQUEST ) if ( 'url' in dirty_fields ) : node_addon . owner . add_log ( action = 'forward_url_changed' , params = dict ( node = node_addon . owner . _id , project = node_addon . owner . parent_id , forward_url = node_addon . url ) , auth = auth , save = True ) return { }
set configuration for forward node settings .