Translation support + french.
This commit is contained in:
parent
e9873c1943
commit
f059d3c61f
16 changed files with 380 additions and 169 deletions
|
|
@ -7,6 +7,7 @@ use crate::{
|
|||
consts,
|
||||
data::model,
|
||||
hash::{hash, verify_password},
|
||||
services::user,
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
@ -162,6 +163,16 @@ WHERE [id] = $1
|
|||
})
|
||||
}
|
||||
|
||||
pub async fn set_user_lang(&self, user_id: i64, lang: &str) -> Result<()> {
|
||||
sqlx::query("UPDATE [User] SET [lang] = $2 WHERE [id] = $1")
|
||||
.bind(user_id)
|
||||
.bind(lang)
|
||||
.execute(&self.pool)
|
||||
.await
|
||||
.map(|_| ())
|
||||
.map_err(DBError::from)
|
||||
}
|
||||
|
||||
pub async fn sign_up(&self, email: &str, password: &str) -> Result<SignUpResult> {
|
||||
self.sign_up_with_given_time(email, password, Utc::now())
|
||||
.await
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue