mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-29 20:43:37 +03:00
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:
parent
2c6f295cc5
commit
c1cd40a811
@ -33,8 +33,13 @@ pub mod commands {
|
|||||||
pub fn get_project(
|
pub fn get_project(
|
||||||
projects: State<'_, Controller>,
|
projects: State<'_, Controller>,
|
||||||
id: ProjectId,
|
id: ProjectId,
|
||||||
|
no_validation: Option<bool>,
|
||||||
) -> Result<projects::Project, Error> {
|
) -> 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)]
|
#[tauri::command(async)]
|
||||||
|
Loading…
Reference in New Issue
Block a user