summaryrefslogtreecommitdiffstats
path: root/server/src/api/community.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/api/community.rs')
-rw-r--r--server/src/api/community.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/src/api/community.rs b/server/src/api/community.rs
index 296a77ea..7610d1b7 100644
--- a/server/src/api/community.rs
+++ b/server/src/api/community.rs
@@ -358,7 +358,7 @@ impl Perform for Oper<EditCommunity> {
published: None,
};
- let _updated_community = match Community::update(&conn, data.edit_id, &community_form) {
+ let updated_community = match Community::update(&conn, data.edit_id, &community_form) {
Ok(community) => community,
Err(_e) => return Err(APIError::err("couldnt_update_community").into()),
};
@@ -377,6 +377,11 @@ impl Perform for Oper<EditCommunity> {
expires,
};
ModRemoveCommunity::create(&conn, &form)?;
+ updated_community.send_delete(&conn)?;
+ }
+
+ if let Some(_deleted) = data.deleted.to_owned() {
+ updated_community.send_delete(&conn)?;
}
let community_view = CommunityView::read(&conn, data.edit_id, Some(user_id))?;