Lotsa Leptos

This commit is contained in:
Bianca Fürstenau 2025-02-22 16:00:00 +01:00
parent 49a9810fd8
commit 8a25a5fa82
5 changed files with 115 additions and 19 deletions

View file

@ -1,8 +1,7 @@
use chrono::offset::Utc;
use rusqlite::{types::ToSqlOutput, ToSql};
use std::collections::HashMap;
use tokio::sync::Mutex;
use tauri::{Manager, State};
use tauri::State;
use crate::types::*;
@ -61,12 +60,11 @@ pub async fn inventory(
#[tauri::command]
pub async fn swap(
store: &str,
store: Store,
acc: i64,
state: State<'_, Mutex<AppState>>,
) -> Result<(), ()> {
let state = state.lock().await;
let store: Store = store.try_into()?;
state.db.execute(
"INSERT INTO swap VALUES (?1, ?2, ?3, ?4, ?5)",
(