]> Untitled Git - lemmy.git/commitdiff
Remove unused setup config vars (#2302)
authorNutomic <me@nutomic.com>
Wed, 8 Jun 2022 15:44:53 +0000 (15:44 +0000)
committerGitHub <noreply@github.com>
Wed, 8 Jun 2022 15:44:53 +0000 (11:44 -0400)
config/defaults.hjson
crates/api_crud/src/site/read.rs
crates/utils/src/settings/structs.rs

index 681e60966fafc6722b12ffa4c24150626dcea061..caed23e97f077b47170e4dc6f33e952a877d89c7 100644 (file)
     # Username for the admin user
     admin_username: "admin"
     # Password for the admin user. It must be at least 10 characters.
-    admin_password: "my_passwd_longer_than_ten_characters"
+    admin_password: "tf6HHDS4RolWfFhk4Rq9"
     # Name of the site (can be changed later)
     site_name: "My Lemmy Instance"
     # Email for the admin user (optional, can be omitted and set later through the website)
-    admin_email: "string"
-    sidebar: "string"
-    description: "string"
-    icon: "string"
-    banner: "string"
-    enable_downvotes: true
-    open_registration: true
-    enable_nsfw: true
-    community_creation_admin_only: true
-    require_email_verification: true
-    require_application: true
-    application_question: "string"
-    private_instance: true
-    default_theme: "string"
-    default_post_listing_type: "string"
+    admin_email: "user@example.com"
   }
   # the domain name of your instance (mandatory)
   hostname: "unset"
index 808dcf7d98ec3a7d8458c10baf6a1e0422e2e9e6..1ef84a91f898ace88861031beac206b62379fb94 100644 (file)
@@ -54,21 +54,8 @@ impl PerformCrud for GetSite {
 
           let create_site = CreateSite {
             name: setup.site_name.to_owned(),
-            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,
-            require_email_verification: setup.require_email_verification,
-            require_application: setup.require_application,
-            application_question: setup.application_question.to_owned(),
-            private_instance: setup.private_instance,
-            default_theme: setup.default_theme.to_owned(),
-            default_post_listing_type: setup.default_post_listing_type.to_owned(),
             auth: admin_jwt,
+            ..CreateSite::default()
           };
           create_site.perform(context, websocket_id).await?;
           info!("Site {} created", setup.site_name);
index 561d5cec94f57262a2a8f46bef3ee15059a9ee93..f57410ee30e5b05a8f95336546e0570fa4390d55 100644 (file)
@@ -183,40 +183,13 @@ pub struct SetupConfig {
   #[doku(example = "admin")]
   pub admin_username: String,
   /// Password for the admin user. It must be at least 10 characters.
-  #[doku(example = "my_passwd_longer_than_ten_characters")]
+  #[doku(example = "tf6HHDS4RolWfFhk4Rq9")]
   pub admin_password: String,
   /// Name of the site (can be changed later)
   #[doku(example = "My Lemmy Instance")]
   pub site_name: String,
   /// Email for the admin user (optional, can be omitted and set later through the website)
+  #[doku(example = "user@example.com")]
   #[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>,
-  #[default(None)]
-  pub require_email_verification: Option<bool>,
-  #[default(None)]
-  pub require_application: Option<bool>,
-  #[default(None)]
-  pub application_question: Option<String>,
-  #[default(None)]
-  pub private_instance: Option<bool>,
-  #[default(None)]
-  pub default_theme: Option<String>,
-  #[default(None)]
-  pub default_post_listing_type: Option<String>,
 }