server: Prevent user updates from applying to everyone

This commit is contained in:
Valentin Tolmer 2021-09-19 19:45:19 +02:00
parent 69afe4b49e
commit 1174bd73c7

View File

@ -220,6 +220,7 @@ impl BackendHandler for SqlBackendHandler {
let query = Query::update()
.table(Users::Table)
.values(values)
.and_where(Expr::col(Users::UserId).eq(request.user_id))
.to_string(DbQueryBuilder {});
sqlx::query(&query).execute(&self.sql_pool).await?;
Ok(())