Desacoblar playlists de sessions i afegir slow jams
This commit is contained in:
40
folkugat_web/api/routes/playlist/set_page.py
Normal file
40
folkugat_web/api/routes/playlist/set_page.py
Normal file
@@ -0,0 +1,40 @@
|
||||
from fastapi import Request
|
||||
from folkugat_web.api.router import get_router
|
||||
from folkugat_web.fragments import set_page
|
||||
from folkugat_web.services import auth
|
||||
from folkugat_web.templates import templates
|
||||
|
||||
router = get_router()
|
||||
|
||||
|
||||
@router.get("/playlist/{playlist_id}/set/{set_id}")
|
||||
def page(
|
||||
request: Request,
|
||||
logged_in: auth.LoggedIn,
|
||||
playlist_id: int,
|
||||
set_id: int,
|
||||
):
|
||||
return templates.TemplateResponse(
|
||||
"index.html",
|
||||
{
|
||||
"request": request,
|
||||
"page_title": "Folkugat",
|
||||
"content": f"/api/content/playlist/{playlist_id}/set/{set_id}",
|
||||
"logged_in": logged_in,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@router.get("/api/content/playlist/{playlist_id}/set/{set_id}")
|
||||
async def contingut(
|
||||
request: Request,
|
||||
logged_in: auth.LoggedIn,
|
||||
playlist_id: int,
|
||||
set_id: int,
|
||||
):
|
||||
return await set_page.pagina(
|
||||
request=request,
|
||||
playlist_id=playlist_id,
|
||||
set_id=set_id,
|
||||
logged_in=logged_in,
|
||||
)
|
||||
Reference in New Issue
Block a user