Patch compilation against live schema

This commit is contained in:
jude 2022-09-17 12:50:16 +01:00
parent 57336f5c81
commit 133b00a2ce
3 changed files with 9 additions and 6 deletions

2
Cargo.lock generated
View File

@ -2145,7 +2145,7 @@ checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244"
[[package]]
name = "reminder_rs"
version = "1.6.5"
version = "1.6.6"
dependencies = [
"base64",
"chrono",

View File

@ -1,6 +1,6 @@
[package]
name = "reminder_rs"
version = "1.6.5"
version = "1.6.6"
authors = ["jellywx <judesouthworth@pm.me>"]
edition = "2018"

View File

@ -61,10 +61,13 @@ pub async fn get_user_info(
.member(&ctx.inner(), user_id)
.await;
let timezone = sqlx::query!("SELECT timezone FROM users WHERE user = ?", user_id)
.fetch_one(pool.inner())
.await
.map_or(None, |q| Some(q.timezone));
let timezone = sqlx::query!(
"SELECT IFNULL(timezone, 'UTC') AS timezone FROM users WHERE user = ?",
user_id
)
.fetch_one(pool.inner())
.await
.map_or(None, |q| Some(q.timezone));
let user_info = UserInfo {
name: cookies