let create_site = CreateSite {
name: setup.site_name.to_owned(),
- sidebar: None,
- description: None,
- icon: None,
- banner: None,
- enable_downvotes: None,
- open_registration: None,
- enable_nsfw: None,
+ sidebar: setup.sidebar.to_owned(),
+ description: setup.description.to_owned(),
+ icon: setup.icon.to_owned(),
+ banner: setup.banner.to_owned(),
+ enable_downvotes: setup.enable_downvotes,
+ open_registration: setup.open_registration,
+ enable_nsfw: setup.enable_nsfw,
+ community_creation_admin_only: setup.community_creation_admin_only,
auth: login_response.jwt,
- community_creation_admin_only: None,
};
create_site.perform(context, websocket_id).await?;
info!("Site {} created", setup.site_name);
);
// Make sure block set the creator blocked
- assert_eq!(true, read_comment_from_blocked_person.creator_blocked);
+ assert!(read_comment_from_blocked_person.creator_blocked);
assert_eq!(1, num_deleted);
assert_eq!(1, like_removed);
pub image_per_second: i32,
}
-#[derive(Debug, Deserialize, Clone)]
+#[derive(Debug, Deserialize, Clone, SmartDefault)]
pub struct SetupConfig {
pub admin_username: String,
pub admin_password: String,
- pub admin_email: Option<String>,
pub site_name: String,
+ #[default(None)]
+ pub admin_email: Option<String>,
+ #[default(None)]
+ pub sidebar: Option<String>,
+ #[default(None)]
+ pub description: Option<String>,
+ #[default(None)]
+ pub icon: Option<String>,
+ #[default(None)]
+ pub banner: Option<String>,
+ #[default(None)]
+ pub enable_downvotes: Option<bool>,
+ #[default(None)]
+ pub open_registration: Option<bool>,
+ #[default(None)]
+ pub enable_nsfw: Option<bool>,
+ #[default(None)]
+ pub community_creation_admin_only: Option<bool>,
}
admin_username: lemmy_alpha
admin_password: lemmy
site_name: lemmy-alpha
+ sidebar: alphas sidebar
}
database: {
database: lemmy