flip_api.role_services.get_roles

Attributes

router

Functions

get_roles(, token_id)

Retrieve all roles in the system.

Module Contents

flip_api.role_services.get_roles.router
flip_api.role_services.get_roles.get_roles(session: sqlmodel.Session = Depends(get_session), token_id: uuid.UUID = Depends(verify_token)) flip_api.domain.interfaces.role.IRolesResponse

Retrieve all roles in the system.

Parameters:
  • session (Session) – Database session for executing queries.

  • token_id (UUID) – User ID from authentication token.

Returns:

An object containing a list of roles in the system.

Return type:

IRolesResponse

Raises:

HTTPException – If the user does not have permission to manage users, or if there is a database error.