Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -31,18 +31,6 @@ def webhook(data: dict):
|
|
| 31 |
#await client.get(f"{BASE_URL}/sendMessage?chat_id={chat_id}&text={text}")
|
| 32 |
return {"response": "ok"}
|
| 33 |
|
| 34 |
-
@app.post("/TEST")
|
| 35 |
-
def test(data: dict):
|
| 36 |
-
url = "http://api.telegram.org/bot6770617809:AAEhytQUOl3uZOFINVE7-o0KkIoAz8perGU/sendMessage?chat_id=1738997897&text=Come_Stai_Vez"
|
| 37 |
-
try:
|
| 38 |
-
response = requests.get(url)
|
| 39 |
-
response.raise_for_status() # Controlla se la richiesta ha avuto successo
|
| 40 |
-
print(response.json()) # Stampa la risposta JSON
|
| 41 |
-
except requests.exceptions.RequestException as e:
|
| 42 |
-
print(f"Errore nella richiesta: {e}")
|
| 43 |
-
return {"response": "TEST"}
|
| 44 |
-
|
| 45 |
-
|
| 46 |
@app.get("/")
|
| 47 |
def read_general():
|
| 48 |
return {"response": "Started"}
|
|
|
|
| 31 |
#await client.get(f"{BASE_URL}/sendMessage?chat_id={chat_id}&text={text}")
|
| 32 |
return {"response": "ok"}
|
| 33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
@app.get("/")
|
| 35 |
def read_general():
|
| 36 |
return {"response": "Started"}
|