Files
rowt/src/model/log.rs
Philipp Hofer e4a8caf632
Some checks failed
CI/CD Pipeline / test (push) Successful in 17m41s
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
prepare to remove old log, in favor of activities
2025-05-12 22:29:34 +02:00

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
}
}