upgrade sqlx to 0.7 Fixes #76 restructure registrations
All checks were successful
CI/CD Pipeline / test (push) Successful in 10m57s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped

This commit is contained in:
2023-11-22 13:19:31 +01:00
parent ab6ab4af8d
commit 7569798b00
11 changed files with 450 additions and 296 deletions

View File

@@ -1,3 +1,5 @@
use std::ops::DerefMut;
use chrono::{DateTime, Local, NaiveDateTime, TimeZone, Utc};
use serde::{Deserialize, Serialize};
use sqlx::{FromRow, Sqlite, SqlitePool, Transaction};
@@ -17,7 +19,7 @@ impl Log {
}
pub async fn create_with_tx(db: &mut Transaction<'_, Sqlite>, msg: String) -> bool {
sqlx::query!("INSERT INTO log(msg) VALUES (?)", msg,)
.execute(db)
.execute(db.deref_mut())
.await
.is_ok()
}