@app.route('/notes', methods=['GET'])
def list_notes():
 id_token = request.headers['Authorization'].split(' ').pop()
 claims = google.oauth2.id_token.verify_firebase_token(id_token, HTTP_REQUEST)
 if (not claims):
  return ('Unauthorized', 401)
 notes = query_database(claims['sub'])
 return jsonify(notes)

@ app . route ( '/notes' , methods = [ 'GET' ] ) def list_notes ( ) : id_token = request . headers [ 'Authorization' ] . split ( ' ' ) . pop ( ) claims = google . oauth2 . id_token . verify_firebase_token ( id_token , HTTP_REQUEST ) if ( not claims ) : return ( 'Unauthorized' , 401 ) notes = query_database ( claims [ 'sub' ] ) return jsonify ( notes )
returns a list of notes added by the current firebase user .