diff options
Diffstat (limited to 'app/routers/web.py')
| -rw-r--r-- | app/routers/web.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/routers/web.py b/app/routers/web.py new file mode 100644 index 0000000..e97bc42 --- /dev/null +++ b/app/routers/web.py @@ -0,0 +1,9 @@ +from fastapi import APIRouter, Request + +router = APIRouter(prefix="/photos") + +@router.get("/") +async def main_page(request: Request): + images = request.app.state.image_service.get_all_images() + return request.app.state.templates.TemplateResponse( + request=request, name="index.html", context={"images": images})
\ No newline at end of file |
