Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -1025,7 +1025,16 @@ def check_link():
|
|
| 1025 |
except Exception as e:
|
| 1026 |
print(f"Link check error: {type(e).__name__}: {e}")
|
| 1027 |
return jsonify({"error": "Could not check the link right now. Try again shortly."}), 502
|
|
|
|
| 1028 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1029 |
|
| 1030 |
if __name__ == '__main__':
|
| 1031 |
app.run(host="0.0.0.0", port=7860)
|
|
|
|
| 1025 |
except Exception as e:
|
| 1026 |
print(f"Link check error: {type(e).__name__}: {e}")
|
| 1027 |
return jsonify({"error": "Could not check the link right now. Try again shortly."}), 502
|
| 1028 |
+
|
| 1029 |
|
| 1030 |
+
@app.route('/check-waitlist', methods=['GET'])
|
| 1031 |
+
def check_waitlist():
|
| 1032 |
+
if request.args.get('token') != SCAN_SECRET:
|
| 1033 |
+
return jsonify({"error": "Unauthorized"}), 401
|
| 1034 |
+
ok, err = supabase_insert("waitlist", {"name": "Test", "email": "wltest@test.com", "plan": "Free"})
|
| 1035 |
+
rows, rerr = supabase_select("waitlist")
|
| 1036 |
+
return jsonify({"insert_ok": ok, "insert_error": err, "row_count": len(rows) if rows else 0, "read_error": rerr})
|
| 1037 |
+
|
| 1038 |
|
| 1039 |
if __name__ == '__main__':
|
| 1040 |
app.run(host="0.0.0.0", port=7860)
|