(
session: SessionDep,
current_user: CurrentUser,
collection_id: uuid.UUID,
collection_in: CollectionUpdate,
)
| 92 | |
| 93 | @router.put("/collections/{collection_id}", response_model=Collection) |
| 94 | def update_collection( |
| 95 | session: SessionDep, |
| 96 | current_user: CurrentUser, |
| 97 | collection_id: uuid.UUID, |
| 98 | collection_in: CollectionUpdate, |
| 99 | ) -> Any: |
| 100 | collection = services.get_collection( |
| 101 | session=session, id=collection_id, user_id=current_user.id |
| 102 | ) |
| 103 | if not collection: |
| 104 | raise HTTPException(status_code=404, detail="Collection not found") |
| 105 | return services.update_collection( |
| 106 | session=session, collection=collection, collection_in=collection_in |
| 107 | ) |
| 108 | |
| 109 | |
| 110 | @router.delete("/collections/{collection_id}", status_code=204) |
nothing calls this directly
no outgoing calls
no test coverage detected