flip_api.project_services.approve_project
Attributes
Functions
|
Approves a project that is currently in the 'STAGED' status. |
Module Contents
- flip_api.project_services.approve_project.router
- flip_api.project_services.approve_project.approve_project_endpoint(project_id: uuid.UUID = Path(..., description='The ID of the project to approve.'), payload: flip_api.domain.schemas.projects.ApproveProjectBodyPayload = Body(..., description='Payload containing trust IDs to approve the project for.'), user_id: uuid.UUID = Depends(verify_token), db: sqlmodel.Session = Depends(get_session))
Approves a project that is currently in the ‘STAGED’ status. The approval is specific to the list of trust IDs provided in the request body.
- Parameters:
project_id (UUID) – The ID of the project to approve.
payload (ApproveProjectBodyPayload) – The payload containing trust IDs to approve the project for.
user_id (UUID) – The ID of the user making the request.
db (Session) – The database session.
- Returns:
A list of trusts that the project has been approved for.
- Return type:
list[ITrust]
- Raises:
HTTPException – If the user does not have permission to approve projects, if the project does not exist, or if there are validation errors.