fix: account username changing

This commit is contained in:
trisua 2025-05-12 21:06:22 -04:00
parent 65f59100ce
commit 08505c2403
4 changed files with 40 additions and 5 deletions

View file

@ -422,7 +422,7 @@ impl DataManager {
let res = execute!(
&conn,
"UPDATE users SET username = $1 WHERE id = $2",
params![&to.as_str(), &(id as i64)]
params![&to.to_lowercase(), &(id as i64)]
);
if let Err(e) = res {
@ -430,7 +430,6 @@ impl DataManager {
}
self.cache_clear_user(&user).await;
Ok(())
}