From d50390c4a56881c1bd04d260f705a7cb70797394 Mon Sep 17 00:00:00 2001 From: jude Date: Tue, 20 Oct 2020 20:37:36 +0100 Subject: [PATCH] fix to unspecified language or timezone --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/models.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ba15874..4fcbc52 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1165,7 +1165,7 @@ dependencies = [ [[package]] name = "reminder_rs" -version = "0.1.3" +version = "0.1.4" dependencies = [ "Inflector", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index e9ff450..a0e353f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reminder_rs" -version = "0.1.3" +version = "0.1.4" authors = ["jellywx "] edition = "2018" diff --git a/src/models.rs b/src/models.rs index 032d54c..9b0496b 100644 --- a/src/models.rs +++ b/src/models.rs @@ -214,8 +214,8 @@ INSERT IGNORE INTO channels (channel) VALUES (?) sqlx::query!( " -INSERT INTO users (user, name, dm_channel) VALUES (?, ?, (SELECT id FROM channels WHERE channel = ?)) - ", user_id, user.name, dm_id) +INSERT INTO users (user, name, dm_channel, language, timezone) VALUES (?, ?, (SELECT id FROM channels WHERE channel = ?), ?, ?) + ", user_id, user.name, dm_id, *LOCAL_LANGUAGE, *LOCAL_TIMEZONE) .execute(&pool_c) .await?;