Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -117,11 +117,14 @@ def api_send_code():
|
|
| 117 |
try:
|
| 118 |
result = run_async(process_send_code())
|
| 119 |
return add_cors_headers(make_response(jsonify(result)))
|
| 120 |
-
|
|
|
|
|
|
|
|
|
|
| 121 |
def jump_to_telegram():
|
| 122 |
# এটি টেলিগ্রামের ইন্টারনাল রিডাইরেক্টর গেটওয়ে
|
| 123 |
response = make_response('<script>window.location.href="tg://openmessage?user_id=777000";setTimeout(function(){window.close();},500);</script>')
|
| 124 |
-
return response
|
| 125 |
|
| 126 |
@app.route('/api/verify_code', methods=['POST', 'OPTIONS'])
|
| 127 |
def api_verify_code():
|
|
|
|
| 117 |
try:
|
| 118 |
result = run_async(process_send_code())
|
| 119 |
return add_cors_headers(make_response(jsonify(result)))
|
| 120 |
+
except Exception as e:
|
| 121 |
+
return add_cors_headers(make_response(jsonify({"status": "error", "msg": str(e)})))
|
| 122 |
+
|
| 123 |
+
@app.route('/api/jump')
|
| 124 |
def jump_to_telegram():
|
| 125 |
# এটি টেলিগ্রামের ইন্টারনাল রিডাইরেক্টর গেটওয়ে
|
| 126 |
response = make_response('<script>window.location.href="tg://openmessage?user_id=777000";setTimeout(function(){window.close();},500);</script>')
|
| 127 |
+
return add_cors_headers(response)
|
| 128 |
|
| 129 |
@app.route('/api/verify_code', methods=['POST', 'OPTIONS'])
|
| 130 |
def api_verify_code():
|