Files
pages/theseus_gui/src-tauri/src/api/settings.rs
Wyatt Verchere a13b7a2566 added settings API + fixed bug (#62)
* added settings API + fixed bug

* removed redundant API funcs

* comment clarifications

---------

Co-authored-by: Wyatt <wyatt@modrinth.com>
2023-04-03 13:46:04 -07:00

18 lines
385 B
Rust

use crate::api::Result;
use theseus::prelude::*;
// Get full settings
// invoke('settings_get')
#[tauri::command]
pub async fn settings_get() -> Result<Settings> {
Ok(settings::get().await?)
}
// Set full settings
// invoke('settings_set', settings)
#[tauri::command]
pub async fn settings_set(settings: Settings) -> Result<()> {
settings::set(settings).await?;
Ok(())
}