From 4d2d0c1101829675d8005ea425442653a0d5fa5a Mon Sep 17 00:00:00 2001 From: sticks Date: Mon, 25 Nov 2024 19:46:03 -0600 Subject: [PATCH] fuck sqlx --- src/handlers/db.rs | 4 ++-- src/structs/quote.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/handlers/db.rs b/src/handlers/db.rs index 22c21fb..45b9985 100644 --- a/src/handlers/db.rs +++ b/src/handlers/db.rs @@ -122,7 +122,7 @@ impl DatabaseController { username: q.username, quote: q.quote, added_by: q.added_by, - added_at: q.added_at, + added_at: q.added_at.unwrap(), })), Err(sqlx::Error::RowNotFound) => Ok(None), Err(e) => Err(e), @@ -142,7 +142,7 @@ impl DatabaseController { username: q.username, quote: q.quote, added_by: q.added_by, - added_at: q.added_at, + added_at: q.added_at.unwrap(), }); } diff --git a/src/structs/quote.rs b/src/structs/quote.rs index 18b5c67..8e8bce6 100644 --- a/src/structs/quote.rs +++ b/src/structs/quote.rs @@ -7,5 +7,5 @@ pub struct Quote { pub username: String, pub quote: String, pub added_by: i64, - pub added_at: Option, + pub added_at: OffsetDateTime, }