Files
AstralRinth/packages/app-lib/src/api/settings.rs
Geometrically 49a20a303a Migrate to SQLite for Internal Launcher Data (#1300)
* 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
2024-07-24 18:03:19 +00:00

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(())
}