Update app.py
Browse files
app.py
CHANGED
@@ -60,7 +60,7 @@ def register():
|
|
60 |
})
|
61 |
return jsonify({"success": True, "message": "Registration successful", "customer_id": new_customer["id"]})
|
62 |
except Exception as e:
|
63 |
-
return jsonify({"error": f"Registration failed: {str(e)}"}), 500
|
64 |
|
65 |
# ✅ LOGIN API: Validate User Credentials
|
66 |
@app.route("/login", methods=["POST"])
|
@@ -83,11 +83,10 @@ def login():
|
|
83 |
"customer_id": user["Id"],
|
84 |
"name": user["Name"]
|
85 |
})
|
86 |
-
|
87 |
else:
|
88 |
return jsonify({"error": "Invalid login credentials"}), 401
|
89 |
except Exception as e:
|
90 |
-
return jsonify({"error": f"Login failed: {str(e)}"}), 500
|
91 |
|
92 |
# ✅ MENU API: Fetch Menu Items from Salesforce
|
93 |
@app.route("/menu", methods=["GET"])
|
|
|
60 |
})
|
61 |
return jsonify({"success": True, "message": "Registration successful", "customer_id": new_customer["id"]})
|
62 |
except Exception as e:
|
63 |
+
return jsonify({"error": f"Registration failed: {str(e)}"}), 500)
|
64 |
|
65 |
# ✅ LOGIN API: Validate User Credentials
|
66 |
@app.route("/login", methods=["POST"])
|
|
|
83 |
"customer_id": user["Id"],
|
84 |
"name": user["Name"]
|
85 |
})
|
|
|
86 |
else:
|
87 |
return jsonify({"error": "Invalid login credentials"}), 401
|
88 |
except Exception as e:
|
89 |
+
return jsonify({"error": f"Login failed: {str(e)}"}), 500)
|
90 |
|
91 |
# ✅ MENU API: Fetch Menu Items from Salesforce
|
92 |
@app.route("/menu", methods=["GET"])
|