diff options
| author | Dylan Bolger <dylan.bolger00@gmail.com> | 2026-08-17 16:58:04 -0500 |
|---|---|---|
| committer | Dylan Bolger <dylan.bolger00@gmail.com> | 2026-08-17 16:58:04 -0500 |
| commit | a06a7e8f23bfd64565da4e4141f186180e84a104 (patch) | |
| tree | 297a4fb79bccdb94cda9eaccecc4af9cc9766210 /app/routers | |
| download | photoblog-a06a7e8f23bfd64565da4e4141f186180e84a104.tar.xz photoblog-a06a7e8f23bfd64565da4e4141f186180e84a104.zip | |
initial push of photoblog
Diffstat (limited to 'app/routers')
| -rw-r--r-- | app/routers/__init__.py | 0 | ||||
| -rw-r--r-- | app/routers/web.py | 9 |
2 files changed, 9 insertions, 0 deletions
diff --git a/app/routers/__init__.py b/app/routers/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/routers/__init__.py 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 |
