18 lines
No EOL
544 B
Rust
18 lines
No EOL
544 B
Rust
use onelauncher_core::entity::setting_profiles::Model as SettingsModel;
|
|
use onelauncher_core::api::setting_profiles;
|
|
|
|
use crate::api::error::SerializableResult;
|
|
|
|
#[specta::specta]
|
|
#[tauri::command]
|
|
pub async fn get_global_profile() -> SerializableResult<SettingsModel> {
|
|
Ok(setting_profiles::get_global_profile().await)
|
|
}
|
|
|
|
#[specta::specta]
|
|
#[tauri::command]
|
|
pub async fn get_profile_or_default(
|
|
name: Option<String>,
|
|
) -> SerializableResult<SettingsModel> {
|
|
Ok(setting_profiles::dao::get_profile_or_default(name.as_ref()).await?)
|
|
} |