mirror of
https://code.lenaisten.de/Lenaisten/advent22.git
synced 2024-11-22 15:53:01 +00:00
router: "images" -> "user"
This commit is contained in:
parent
d7818ac93a
commit
60a451a426
6 changed files with 10 additions and 10 deletions
|
@ -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)
|
||||
|
|
|
@ -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(
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<figure>
|
||||
<div class="image is-unselectable">
|
||||
<img :src="$advent22.api_url('images/background')" />
|
||||
<img :src="$advent22.api_url('user/background_image')" />
|
||||
<ThouCanvas>
|
||||
<CalendarDoor
|
||||
v-for="(door, index) in doors"
|
||||
|
|
|
@ -25,7 +25,7 @@ export default class extends Vue {
|
|||
this.$emit("doorClick");
|
||||
|
||||
this.$advent22
|
||||
.api_get_blob(`images/${this.door.day}`)
|
||||
.api_get_blob(`user/image_${this.door.day}`)
|
||||
.then((data) => this.$emit("doorSuccess", this.door.day, data))
|
||||
.catch(([reason]) => {
|
||||
let msg = "Unbekannter Fehler, bitte wiederholen!";
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
<figure class="image is-unselectable">
|
||||
<img :src="$advent22.api_url('images/background')" />
|
||||
<img :src="$advent22.api_url('user/background_image')" />
|
||||
<ThouCanvas>
|
||||
<PreviewDoor
|
||||
v-for="(_, index) in doors"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
<figure class="image is-unselectable">
|
||||
<img :src="$advent22.api_url('images/background')" />
|
||||
<img :src="$advent22.api_url('user/background_image')" />
|
||||
<RectangleCanvas
|
||||
:rectangles="rectangles"
|
||||
@draw="on_draw"
|
||||
|
|
Loading…
Reference in a new issue