add: json

This commit is contained in:
2026-02-24 13:04:50 +00:00
parent d9796b0b87
commit dd6ca2d75b

View File

@@ -77,8 +77,10 @@ def delete():
@app.route("/lookup", methods=["POST"])
def lookup():
name = request.form.get("name")
data = request.get_json()
if not data or "name" not in data:
return jsonify({"error": "Not found"}), 404
name = data["name"]
conn = get_db_connection()
cursor = conn.cursor()
cursor.execute(