You've already forked AstralRinth
forked from didirus/AstralRinth
* initial migration * barebones profiles * Finish profiles * Add back file watcher * UI support progress * Finish most of cache * Fix options page * Fix forge, finish modrinth auth * Accounts, process cache * Run SQLX prepare * Finish * Run lint + actions * Fix version to be compat with windows * fix lint * actually fix lint * actually fix lint again
24 lines
548 B
Rust
24 lines
548 B
Rust
//! Theseus profile management interface
|
|
|
|
pub use crate::{
|
|
state::{Hooks, MemorySettings, Profile, Settings, WindowSize},
|
|
State,
|
|
};
|
|
|
|
/// Gets entire settings
|
|
#[tracing::instrument]
|
|
pub async fn get() -> crate::Result<Settings> {
|
|
let state = State::get().await?;
|
|
let settings = Settings::get(&state.pool).await?;
|
|
Ok(settings)
|
|
}
|
|
|
|
/// Sets entire settings
|
|
#[tracing::instrument]
|
|
pub async fn set(settings: Settings) -> crate::Result<()> {
|
|
let state = State::get().await?;
|
|
settings.update(&state.pool).await?;
|
|
|
|
Ok(())
|
|
}
|