@api_view(['GET'])
@permission_classes([permissions.IsAuthenticatedOrReadOnly])
def has_node(request):
 node_id = request.GET.get('node_id', '')
 exists = storage.has_node(node_id)
 return Response({'exists': exists})

@ api_view ( [ 'GET' ] ) @ permission_classes ( [ permissions . IsAuthenticatedOrReadOnly ] ) def has_node ( request ) : node_id = request . GET . get ( 'node_id' , '' ) exists = storage . has_node ( node_id ) return Response ( { 'exists' : exists } )
checks to see if a node exists .