Spaces:
Sleeping
Sleeping
Naresh Raja M L commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,7 +11,7 @@ load_dotenv(override=True)
|
|
| 11 |
|
| 12 |
def push(text):
|
| 13 |
"""Send push notification via Pushover"""
|
| 14 |
-
requests.post(
|
| 15 |
"https://api.pushover.net/1/messages.json",
|
| 16 |
data={
|
| 17 |
"token": os.getenv("PUSHOVER_TOKEN"),
|
|
@@ -19,6 +19,9 @@ def push(text):
|
|
| 19 |
"message": text,
|
| 20 |
}
|
| 21 |
)
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
def record_user_details(email, name="Name not provided", notes="not provided"):
|
| 24 |
"""Record user contact details and send push notification"""
|
|
|
|
| 11 |
|
| 12 |
def push(text):
|
| 13 |
"""Send push notification via Pushover"""
|
| 14 |
+
response = requests.post(
|
| 15 |
"https://api.pushover.net/1/messages.json",
|
| 16 |
data={
|
| 17 |
"token": os.getenv("PUSHOVER_TOKEN"),
|
|
|
|
| 19 |
"message": text,
|
| 20 |
}
|
| 21 |
)
|
| 22 |
+
|
| 23 |
+
print("Pushover Response Code:", response.status_code)
|
| 24 |
+
print("Pushover Response:", response.text
|
| 25 |
|
| 26 |
def record_user_details(email, name="Name not provided", notes="not provided"):
|
| 27 |
"""Record user contact details and send push notification"""
|