add unit tests
This commit is contained in:
@ -4,7 +4,7 @@ use sqlx::SqlitePool;
|
||||
|
||||
#[derive(Serialize, Clone)]
|
||||
pub struct PlannedEvent {
|
||||
id: i64,
|
||||
pub id: i64,
|
||||
name: String,
|
||||
planned_amount_cox: i64,
|
||||
allow_guests: bool,
|
||||
@ -47,6 +47,7 @@ WHERE planned_event.id like ?
|
||||
.await
|
||||
.ok()
|
||||
}
|
||||
|
||||
pub async fn get_for_day(db: &SqlitePool, day: NaiveDate) -> Vec<PlannedEventWithUser> {
|
||||
let day = format!("{day}");
|
||||
let events = sqlx::query_as!(
|
||||
|
Reference in New Issue
Block a user