Optionally, skip the validation when getting the project

Add flag to enable getting the project information from the storage without performing the validation
This commit is contained in:
estib 2024-09-02 17:39:40 +02:00
parent 2c6f295cc5
commit c1cd40a811

View File

@ -33,8 +33,13 @@ pub mod commands {
pub fn get_project(
projects: State<'_, Controller>,
id: ProjectId,
no_validation: Option<bool>,
) -> Result<projects::Project, Error> {
Ok(projects.get_validated(id)?)
if no_validation.unwrap_or(false) {
Ok(projects.get(id)?)
} else {
Ok(projects.get_validated(id)?)
}
}
#[tauri::command(async)]