Universal CSV Importer #70
|
|
@ -53,6 +53,20 @@ def list_prompts(session: dict=Depends(require_auth)):
|
||||||
return [r2d(r) for r in cur.fetchall()]
|
return [r2d(r) for r in cur.fetchall()]
|
||||||
|
|
||||||
|
|
||||||
|
@router.get("/placeholders")
|
||||||
|
def list_placeholders_endpoint(session: dict=Depends(require_auth)):
|
||||||
|
"""
|
||||||
|
Get grouped catalog of available placeholders with descriptions and examples.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
Dict mapping category to list of {key, description, example}
|
||||||
|
|
||||||
|
IMPORTANT: This endpoint MUST be defined BEFORE /{prompt_id} to avoid routing conflict.
|
||||||
|
"""
|
||||||
|
profile_id = session['profile_id']
|
||||||
|
return get_placeholder_catalog(profile_id)
|
||||||
|
|
||||||
|
|
||||||
@router.get("/{prompt_id}")
|
@router.get("/{prompt_id}")
|
||||||
def get_prompt(prompt_id: str, session: dict=Depends(require_auth)):
|
def get_prompt(prompt_id: str, session: dict=Depends(require_auth)):
|
||||||
"""Get single AI prompt by ID (UUID)."""
|
"""Get single AI prompt by ID (UUID)."""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user