@collect_auth
def add_pointer(auth):
 to_node_id = request.json.get('toNodeID')
 pointer_to_move = request.json.get('pointerID')
 if (not (to_node_id and pointer_to_move)):
  raise HTTPError(http.BAD_REQUEST)
 pointer = Node.load(pointer_to_move)
 to_node = Node.load(to_node_id)
 try:
  _add_pointers(to_node, [pointer], auth)
 except ValueError:
  raise HTTPError(http.BAD_REQUEST)

@ collect_auth def add_pointer ( auth ) : to_node_id = request . json . get ( 'toNodeID' ) pointer_to_move = request . json . get ( 'pointerID' ) if ( not ( to_node_id and pointer_to_move ) ) : raise HTTPError ( http . BAD_REQUEST ) pointer = Node . load ( pointer_to_move ) to_node = Node . load ( to_node_id ) try : _add_pointers ( to_node , [ pointer ] , auth ) except ValueError : raise HTTPError ( http . BAD_REQUEST )
add a single pointer to a node using only json parameters .