- let updated_community = self.object.into_form();
- let cf = CommunityForm {
- name: updated_community.name,
- title: updated_community.title,
- description: updated_community.description,
- nsfw: updated_community.nsfw,
- // TODO: icon and banner would be hosted on the other instance, ideally we would copy it to ours
- icon: updated_community.icon,
- banner: updated_community.banner,
- ..CommunityForm::default()
- };
- let updated_community = blocking(context.pool(), move |conn| {
- Community::update(conn, community.id, &cf)
- })
- .await??;