You've already forked AstralRinth
forked from didirus/AstralRinth
* added settings API + fixed bug * removed redundant API funcs * comment clarifications --------- Co-authored-by: Wyatt <wyatt@modrinth.com>
18 lines
385 B
Rust
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(())
|
|
}
|