diff --git a/src/routes/bots/edit.rs b/src/routes/bots/edit.rs index 3c5e635b..ba08ea00 100644 --- a/src/routes/bots/edit.rs +++ b/src/routes/bots/edit.rs @@ -63,6 +63,7 @@ pub async fn edit_bot(db: &Db, user: User, target: Ref, data: Json) -> Res remove, .. } = data; + let mut partial = PartialBot { public, analytics, @@ -82,5 +83,7 @@ pub async fn edit_bot(db: &Db, user: User, target: Ref, data: Json) -> Res db.update_bot(&bot.id, &partial, remove.unwrap_or_else(Vec::new)) .await?; + + bot.apply_options(partial); Ok(Json(bot)) }