forked from Ruderverein-Donau-Linz/rowt
17 lines
461 B
Rust
17 lines
461 B
Rust
use super::activity::ActivityBuilder;
|
|
use sqlx::{Sqlite, SqlitePool, Transaction};
|
|
|
|
pub struct Log {}
|
|
|
|
// TODO: remove and convert to proper acitvities
|
|
impl Log {
|
|
pub async fn create(db: &SqlitePool, msg: String) -> bool {
|
|
ActivityBuilder::new(&msg).save(db).await;
|
|
true
|
|
}
|
|
pub async fn create_with_tx(db: &mut Transaction<'_, Sqlite>, msg: String) -> bool {
|
|
ActivityBuilder::new(&msg).save_tx(db).await;
|
|
true
|
|
}
|
|
}
|