1
This commit is contained in:
19
src-tauri/src/commands/app_config.rs
Normal file
19
src-tauri/src/commands/app_config.rs
Normal file
@@ -0,0 +1,19 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user