(
session: SessionDep,
current_user: CurrentUser,
collection_id: uuid.UUID,
card_id: uuid.UUID,
)
| 170 | |
| 171 | @router.get("/collections/{collection_id}/cards/{card_id}", response_model=Card) |
| 172 | def read_card( |
| 173 | session: SessionDep, |
| 174 | current_user: CurrentUser, |
| 175 | collection_id: uuid.UUID, |
| 176 | card_id: uuid.UUID, |
| 177 | ) -> Any: |
| 178 | if not services.check_collection_access(session, collection_id, current_user.id): |
| 179 | raise HTTPException(status_code=404, detail="Collection not found") |
| 180 | card = services.get_card_with_collection( |
| 181 | session=session, card_id=card_id, user_id=current_user.id |
| 182 | ) |
| 183 | if not card or card.collection_id != collection_id: |
| 184 | raise HTTPException(status_code=404, detail="Card not found") |
| 185 | return card |
| 186 | |
| 187 | |
| 188 | @router.put("/collections/{collection_id}/cards/{card_id}", response_model=Card) |
nothing calls this directly
no outgoing calls
no test coverage detected