Skip to content

Commit

Permalink
Add update_model comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sabotack committed Nov 28, 2023
1 parent ffe19c7 commit f8579d2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/api/ecdar_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ impl EcdarApi for ConcreteEcdarApi {
}
}

/// Updates a Model in the database given its id.
///
/// # Errors
/// This function will return an error if the model does not exist in the database
/// or if the user does not have access to the model with role 'Editor'.
async fn update_model(
&self,
request: Request<UpdateModelRequest>,
Expand Down Expand Up @@ -202,6 +207,8 @@ impl EcdarApi for ConcreteEcdarApi {
Err(error) => return Err(Status::internal(error.to_string())),
};

// TODO: Check if the model is in use

let new_model = model::Model {
id: model.id,
name: match message.clone().name {
Expand Down

0 comments on commit f8579d2

Please sign in to comment.