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]] [[package]]
name = "reminder_rs" name = "reminder_rs"
version = "1.6.5" version = "1.6.6"
dependencies = [ dependencies = [
"base64", "base64",
"chrono", "chrono",

View File

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

View File

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