29 lines
619 B
Python
29 lines
619 B
Python
|
|
from fastapi import APIRouter
|
||
|
|
from datetime import datetime, timedelta
|
||
|
|
from core.config import API_VERSION
|
||
|
|
|
||
|
|
router = APIRouter()
|
||
|
|
|
||
|
|
@router.get("/status")
|
||
|
|
async def server_status():
|
||
|
|
utc_time = datetime.utcnow()
|
||
|
|
wib_time = utc_time + timedelta(hours=7)
|
||
|
|
formatted_time = wib_time.strftime("%d-%m-%Y %H:%M:%S")
|
||
|
|
|
||
|
|
return {
|
||
|
|
"status": "success",
|
||
|
|
"message": "Server is running smoothly ✅",
|
||
|
|
"data": {
|
||
|
|
"service": "upload_automation",
|
||
|
|
"timestamp": f"{formatted_time} WIB"
|
||
|
|
},
|
||
|
|
"meta": {"version": API_VERSION, "environment": "deployment"}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|