This commit is contained in:
2025-12-02 14:07:35 +01:00
commit 9b84566eb4
62 changed files with 12861 additions and 0 deletions

17
app/routers/system.py Normal file
View File

@@ -0,0 +1,17 @@
from fastapi import APIRouter
import requests
router = APIRouter(
prefix="/system",
tags=["system"],
responses={404: {"description": "Not found"}},
)
@router.get("/ip")
async def get_public_ip():
try:
response = requests.get("https://api.ipify.org?format=json", timeout=5)
response.raise_for_status()
return response.json()
except Exception as e:
return {"ip": "Error fetching IP", "error": str(e)}