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