From 60a451a426c2d97d700b09712838df89f8cdd910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Tue, 12 Sep 2023 20:51:26 +0000 Subject: [PATCH] router: "images" -> "user" --- api/advent22_api/routers/__init__.py | 4 ++-- api/advent22_api/routers/{images.py => user.py} | 8 ++++---- ui/src/components/Calendar.vue | 2 +- ui/src/components/calendar/CalendarDoor.vue | 2 +- ui/src/components/editor/DoorChooser.vue | 2 +- ui/src/components/editor/DoorPlacer.vue | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) rename api/advent22_api/routers/{images.py => user.py} (89%) diff --git a/api/advent22_api/routers/__init__.py b/api/advent22_api/routers/__init__.py index c841cfd..f47cd87 100644 --- a/api/advent22_api/routers/__init__.py +++ b/api/advent22_api/routers/__init__.py @@ -1,8 +1,8 @@ from fastapi import APIRouter -from . import admin, images +from . import admin, user router = APIRouter(prefix="/api") router.include_router(admin.router) -router.include_router(images.router) +router.include_router(user.router) diff --git a/api/advent22_api/routers/images.py b/api/advent22_api/routers/user.py similarity index 89% rename from api/advent22_api/routers/images.py rename to api/advent22_api/routers/user.py index 35dfc76..732118a 100644 --- a/api/advent22_api/routers/images.py +++ b/api/advent22_api/routers/user.py @@ -7,14 +7,14 @@ from ..core.depends import get_day_image from ..core.helpers import api_return_image, load_image from ._security import user_can_view_day, user_is_admin -router = APIRouter(prefix="/images", tags=["images"]) +router = APIRouter(prefix="/user", tags=["user"]) @router.get( - "/background", + "/background_image", response_class=StreamingResponse, ) -async def get_background( +async def get_background_image( cal_cfg: CalendarConfig = Depends(get_calendar_config), ) -> StreamingResponse: """ @@ -25,7 +25,7 @@ async def get_background( @router.get( - "/{day}", + "/image_{day}", response_class=StreamingResponse, ) async def get_image_for_day( diff --git a/ui/src/components/Calendar.vue b/ui/src/components/Calendar.vue index 686a6d0..bc3bb26 100644 --- a/ui/src/components/Calendar.vue +++ b/ui/src/components/Calendar.vue @@ -3,7 +3,7 @@
- + this.$emit("doorSuccess", this.door.day, data)) .catch(([reason]) => { let msg = "Unbekannter Fehler, bitte wiederholen!"; diff --git a/ui/src/components/editor/DoorChooser.vue b/ui/src/components/editor/DoorChooser.vue index 4c3e333..abe97ea 100644 --- a/ui/src/components/editor/DoorChooser.vue +++ b/ui/src/components/editor/DoorChooser.vue @@ -11,7 +11,7 @@
- +
- +