20 lines
426 B
Rust
20 lines
426 B
Rust
use std::collections::HashMap;
|
|
|
|
use tauri::State;
|
|
|
|
use crate::app_config::AppConfig;
|
|
|
|
#[tauri::command]
|
|
pub async fn get_app_config(
|
|
app_config: State<'_, AppConfig>,
|
|
) -> Result<HashMap<String, String>, String> {
|
|
Ok(app_config.entries().await)
|
|
}
|
|
|
|
#[tauri::command]
|
|
pub async fn get_app_config_last_message(
|
|
app_config: State<'_, AppConfig>,
|
|
) -> Result<String, String> {
|
|
Ok(app_config.last_message().await)
|
|
}
|