flip_api.model_services.edit_model

Attributes

router

Functions

edit_model_endpoint(, user_id)

Edit a specific model.

Module Contents

flip_api.model_services.edit_model.router
flip_api.model_services.edit_model.edit_model_endpoint(model_id: uuid.UUID, model_details: flip_api.domain.interfaces.model.IModelDetails, db: sqlmodel.Session = Depends(get_session), user_id: uuid.UUID = Depends(verify_token)) None

Edit a specific model.

Parameters:
  • model_id (UUID) – The ID of the model to edit.

  • model_details (IModelDetails) – The new details for the model.

  • db (Session) – Database session.

  • user_id (UUID) – User ID from authentication.

Returns:

None

Raises:

HTTPException – If the user is not allowed, if the model does not exist, if the model is already deleted, if the model status does not allow editing, or if there is a database error.