def user_update(): current_user.set_location(request.form['lng'], request.form['lat']) if 'location_accuracy_meters' in request.form: current_user.location_accuracy_meters = request.form[ 'location_accuracy_meters'] db.session.commit() return "Location updated."
def user_update(): params = request.get_json() current_user.set_location(params["lng"], params["lat"]) if "location_accuracy_meters" in params: current_user.location_accuracy_meters = params["location_accuracy_meters"] db.session.commit() return jsonify({"msg": "Location updated."})
def user_update(): current_user.set_location(request.form['lng'],request.form['lat']) if 'location_accuracy_meters' in request.form: current_user.location_accuracy_meters = request.form['location_accuracy_meters'] db.session.commit() return "Location updated."