13 lines
430 B
Python
13 lines
430 B
Python
from fastapi import APIRouter, Depends
|
|
from fastapi.responses import HTMLResponse
|
|
from sqlalchemy.orm import Session
|
|
|
|
from app.database import get_db
|
|
from app.routers.public import _share_html_for_slug
|
|
|
|
router = APIRouter(tags=["share"])
|
|
|
|
|
|
@router.get("/share/events/{slug}", response_class=HTMLResponse)
|
|
def share_event_short_url(slug: str, db: Session = Depends(get_db)):
|
|
return HTMLResponse(_share_html_for_slug(slug, db))
|