17 lines
486 B
Python
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"))
|