mirror of
https://seed.radicle.dev/rad:z4D5UCArafTzTQpDZNQRuqswh3ury.git
synced 2026-11-21 10:40:41 +08:00
16 lines
417 B
Rust
16 lines
417 B
Rust
use crate::error::Error;
|
|
use crate::types::config::Config;
|
|
use crate::AppState;
|
|
|
|
/// Get active config.
|
|
#[tauri::command]
|
|
pub fn config(ctx: tauri::State<AppState>) -> Result<Config, Error> {
|
|
let config = Config {
|
|
public_key: ctx.profile.public_key,
|
|
alias: ctx.profile.config.node.alias.clone(),
|
|
seeding_policy: ctx.profile.config.node.seeding_policy,
|
|
};
|
|
|
|
Ok::<_, Error>(config)
|
|
}
|