Untitled
Anonymous
Plain Text
02/24/2025 8:41 AM
413 B
18
Indexable
Never
# Update Trusted Contacts
@app.route("/user/<email>", methods=["PUT"])
def update_trusted_contact_number(email):
data = request.json
sql = "UPDATE UserData SET TrustedContactName = %s, TrustedContactNumber = %s WHERE Email = %s"
cursor.execute(sql, (data["TrustedContactName"], data["TrustedContactNumber"], email))
conn.commit()
return jsonify({"message": "User updated successfully"})Editor is loading...
Leave a Comment