members.lumbung.space/members_lumbung_space/routes/resource.py
cellarspoon 2032816eaa
All checks were successful
continuous-integration/drone/push Build is passing
feat: add reload button
2022-01-10 16:31:09 +01:00

17 lines
486 B
Python

"""Resource map routes."""
from fastapi import APIRouter, Depends, Request
from fastapi.responses import RedirectResponse
from members_lumbung_space.dependencies import logged_in
router = APIRouter()
@router.get("/resource/generate", dependencies=[Depends(logged_in)])
async def generate_resource_map(request: Request):
from members_lumbung_space.nextcloud import init_resource_map
await init_resource_map(request.app)
return RedirectResponse(request.url_for("home"))