mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-20 08:01:46 +03:00
22 lines
535 B
Rust
22 lines
535 B
Rust
pub mod commands {
|
|
use gitbutler_core::{
|
|
askpass::{AskpassBroker, AskpassRequest},
|
|
id::Id,
|
|
};
|
|
use tauri::{AppHandle, Manager};
|
|
|
|
#[tauri::command(async)]
|
|
#[tracing::instrument(skip(handle, response))]
|
|
pub async fn submit_prompt_response(
|
|
handle: AppHandle,
|
|
id: Id<AskpassRequest>,
|
|
response: Option<String>,
|
|
) -> Result<(), ()> {
|
|
handle
|
|
.state::<AskpassBroker>()
|
|
.handle_response(id, response)
|
|
.await;
|
|
Ok(())
|
|
}
|
|
}
|