use lemmy_db_views::structs::SiteView;
use lemmy_utils::{
error::LemmyError,
- settings::structs::Settings,
utils::{check_slurs, check_slurs_opt},
ConnectionId,
};
site_description_length_check(desc)?;
}
- let actor_id: DbUrl = Url::parse(&Settings::get().get_protocol_and_hostname())?.into();
+ let actor_id: DbUrl = Url::parse(&context.settings().get_protocol_and_hostname())?.into();
let inbox_url = Some(generate_site_inbox_url(&actor_id)?);
let keypair = generate_actor_keypair()?;
let site_form = SiteForm {
public_key: Some(keypair.public_key),
default_theme: data.default_theme.clone(),
default_post_listing_type: data.default_post_listing_type.clone(),
+ hide_modlog_mod_names: data.hide_modlog_mod_names,
..SiteForm::default()
};
- let create_site = move |conn: &'_ _| Site::create(conn, &site_form);
+ let create_site = move |conn: &mut _| Site::create(conn, &site_form);
blocking(context.pool(), create_site)
.await?
.map_err(|e| LemmyError::from_error_message(e, "site_already_exists"))?;