flip_api.model_services.save_model
Attributes
Functions
|
Create a model for a specific project. |
Module Contents
- flip_api.model_services.save_model.router
- flip_api.model_services.save_model.save_model(request: fastapi.Request, payload: flip_api.domain.interfaces.model.ISaveModel, db: sqlmodel.Session = Depends(get_session), user_id: uuid.UUID = Depends(verify_token)) flip_api.domain.interfaces.shared.IId
Create a model for a specific project.
- Parameters:
request (Request) – The incoming HTTP request.
payload (ISaveModel) – The model data to be saved, including name, description, and project ID.
db (Session) – Database session.
user_id (UUID) – User ID from authentication.
- Returns:
An object containing the ID of the created model.
- Return type:
- Raises:
HTTPException – If the user is not allowed to modify the project, if the project does not exist, if the project is not approved, if there are no approved trusts for the project, or there is a database error.