Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -32,8 +32,10 @@ def root(
|
|
| 32 |
|
| 33 |
@app.get("/user-info")
|
| 34 |
async def get_user_info() -> Dict[str, str]:
|
|
|
|
|
|
|
| 35 |
return {
|
| 36 |
-
"IP Address":
|
| 37 |
}
|
| 38 |
|
| 39 |
def push_noti_tele(message):
|
|
|
|
| 32 |
|
| 33 |
@app.get("/user-info")
|
| 34 |
async def get_user_info() -> Dict[str, str]:
|
| 35 |
+
hostname = socket.gethostname()
|
| 36 |
+
ip_address = socket.gethostbyname(hostname)
|
| 37 |
return {
|
| 38 |
+
"IP Address": ip_address
|
| 39 |
}
|
| 40 |
|
| 41 |
def push_noti_tele(message):
|