2023-02-18 20:17:16 +03:00
|
|
|
"""Main FastAPI paths"""
|
|
|
|
|
2023-02-18 20:25:47 +03:00
|
|
|
from fastapi import Request, Response
|
2023-02-18 20:17:16 +03:00
|
|
|
|
|
|
|
from . import paths
|
2023-02-19 15:27:55 +03:00
|
|
|
from .. import respond
|
2023-02-18 20:17:16 +03:00
|
|
|
|
|
|
|
|
|
|
|
class MainPaths(paths.Paths):
|
2023-02-18 20:25:47 +03:00
|
|
|
"""Main FastAPI app paths,
|
|
|
|
inherits paths.Paths"""
|
2023-02-18 20:17:16 +03:00
|
|
|
|
|
|
|
def add_paths(self) -> None:
|
|
|
|
|
|
|
|
@self.app.get('/')
|
2023-02-20 11:09:43 +03:00
|
|
|
async def index(req: Request) -> Response:
|
2023-02-18 20:25:47 +03:00
|
|
|
return respond.with_tmpl(
|
|
|
|
'index.html',
|
|
|
|
request=req,
|
|
|
|
)
|