from datetime import datetime from fastapi import APIRouter, status, HTTPException routes = APIRouter(prefix="", tags=['Miscellaneous']) @routes.api_route('/', methods=['GET', 'POST', 'PUT', 'DELETE'], status_code=status.HTTP_400_BAD_REQUEST) def RootPathLocked(): pass @routes.get('/isalive', status_code=status.HTTP_200_OK) def CheckServerRunning(): now = datatime.now().strftime('%Y-%m-%d %H:%M:%S') return {'data': f'Last server update: {now}'}