flip_api.trusts_services.get_trusts

Attributes

router

Functions

get_trusts(, user_id)

Retrieve all trusts with their ID and name.

Module Contents

flip_api.trusts_services.get_trusts.router
flip_api.trusts_services.get_trusts.get_trusts(db: sqlmodel.Session = Depends(get_session), user_id: uuid.UUID = Depends(verify_token)) list[flip_api.domain.interfaces.trust.IBasicTrust]

Retrieve all trusts with their ID and name.

Parameters:
  • db (Session) – Database session, provided by dependency injection.

  • user_id (UUID) – ID of the authenticated user making the request.

Returns:

Every trust in the database, reduced to its ID and name.

Return type:

list[IBasicTrust]

Raises:

HTTPException – If an error occurs while fetching trusts from the database.