MCPcopy Create free account
hub / github.com/0010aor/FlashNotes / read_collection

Function read_collection

backend/src/flashcards/api.py:82–90  ·  view source on GitHub ↗
(
    session: SessionDep, current_user: CurrentUser, collection_id: uuid.UUID
)

Source from the content-addressed store, hash-verified

80
81@router.get("/collections/{collection_id}", response_model=Collection)
82def read_collection(
83 session: SessionDep, current_user: CurrentUser, collection_id: uuid.UUID
84) -> Any:
85 collection = services.get_collection(
86 session=session, id=collection_id, user_id=current_user.id
87 )
88 if not collection:
89 raise HTTPException(status_code=404, detail="Collection not found")
90 return collection
91
92
93@router.put("/collections/{collection_id}", response_model=Collection)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected