Guilherme Silberfarb Costa
Initial commit for HF Space
d6c9678
raw
history blame contribute delete
480 Bytes
from __future__ import annotations
from fastapi import APIRouter
from app.services.session_store import session_store
router = APIRouter(prefix="/api/sessions", tags=["sessions"])
@router.post("")
def create_session() -> dict[str, str]:
session = session_store.create()
return {"session_id": session.session_id}
@router.delete("/{session_id}")
def delete_session(session_id: str) -> dict[str, str]:
session_store.delete(session_id)
return {"status": "ok"}