I am new to the flask. I have a problem. I want to use a symptoms parameter from select_symptoms function to get_match function. thank you :)
this my code
@app.route('/organ/id/symptoms/<int:symptoms>', methods=["GET"])
def select_sysmptoms(symptoms):
cur = mysql.connect().cursor()
cur.execute('select symptoms, id, from symptoms where id in (' + str(symptoms) + ')')
symptoms = [dict((cur.description[i][0], value)
for i, value in enumerate(row)) for row in cur.fetchall()]
return jsonify({'The Symptoms': symptoms})
#Diagnosis the symptoms
@app.route('/organ/id/symptoms/diagnosis/')
def get_match():
#how to use the symptoms parameter in select_symptoms function ?/
new_symptoms = request.parameter_storage_class(symptoms)
return jsonify(new_symptoms)