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

Function read_cards

backend/src/flashcards/api.py:124–136  ·  view source on GitHub ↗
(
    session: SessionDep,
    current_user: CurrentUser,
    collection_id: uuid.UUID,
    skip: int = 0,
    limit: int = 100,
)

Source from the content-addressed store, hash-verified

122
123@router.get("/collections/{collection_id}/cards/", response_model=CardList)
124def read_cards(
125 session: SessionDep,
126 current_user: CurrentUser,
127 collection_id: uuid.UUID,
128 skip: int = 0,
129 limit: int = 100,
130) -> Any:
131 if not services.check_collection_access(session, collection_id, current_user.id):
132 raise HTTPException(status_code=404, detail="Collection not found")
133 cards, count = services.get_cards(
134 session=session, collection_id=collection_id, skip=skip, limit=limit
135 )
136 return CardList(data=cards, count=count)
137
138
139@router.post("/collections/{collection_id}/cards/", response_model=Card)

Callers

nothing calls this directly

Calls 1

CardListClass · 0.85

Tested by

no test coverage detected