server: Prevent user updates from applying to everyone

This commit is contained in:
Valentin Tolmer 2021-09-19 19:45:19 +02:00 committed by nitnelave
parent a952968e9f
commit 63467e5050

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(())