felicity-lims/felicity/views/__init__.py
2023-04-08 08:41:48 +02:00

20 lines
612 B
Python

from fastapi import FastAPI
from starlette.responses import HTMLResponse
def default_home_page(app: FastAPI):
@app.get("/backends", response_class=HTMLResponse)
def index():
return """
<!Doctype html>
<html>
<body>
<h1>SecureAPI</h1>
<div class="btn-group">
<a href="/docs"><button>SwaggerUI</button></a>
<a href="/redoc"><button>Redoc</button></a>
<a href="/felicity-gql"><button>Felicity GraphQL</button></a>
</div>
</body>
</html>
"""