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