mirror of
https://github.com/LemmyNet/lemmy
synced 2024-10-30 15:21:20 +00:00
Remove unused setup config vars (#2302)
This commit is contained in:
parent
c050945b1f
commit
7bc2f9fd6d
@ -91,25 +91,11 @@
|
|||||||
# Username for the admin user
|
# Username for the admin user
|
||||||
admin_username: "admin"
|
admin_username: "admin"
|
||||||
# Password for the admin user. It must be at least 10 characters.
|
# 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)
|
# Name of the site (can be changed later)
|
||||||
site_name: "My Lemmy Instance"
|
site_name: "My Lemmy Instance"
|
||||||
# Email for the admin user (optional, can be omitted and set later through the website)
|
# Email for the admin user (optional, can be omitted and set later through the website)
|
||||||
admin_email: "string"
|
admin_email: "user@example.com"
|
||||||
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"
|
|
||||||
}
|
}
|
||||||
# the domain name of your instance (mandatory)
|
# the domain name of your instance (mandatory)
|
||||||
hostname: "unset"
|
hostname: "unset"
|
||||||
|
@ -54,21 +54,8 @@ impl PerformCrud for GetSite {
|
|||||||
|
|
||||||
let create_site = CreateSite {
|
let create_site = CreateSite {
|
||||||
name: setup.site_name.to_owned(),
|
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,
|
auth: admin_jwt,
|
||||||
|
..CreateSite::default()
|
||||||
};
|
};
|
||||||
create_site.perform(context, websocket_id).await?;
|
create_site.perform(context, websocket_id).await?;
|
||||||
info!("Site {} created", setup.site_name);
|
info!("Site {} created", setup.site_name);
|
||||||
|
@ -183,40 +183,13 @@ pub struct SetupConfig {
|
|||||||
#[doku(example = "admin")]
|
#[doku(example = "admin")]
|
||||||
pub admin_username: String,
|
pub admin_username: String,
|
||||||
/// Password for the admin user. It must be at least 10 characters.
|
/// 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,
|
pub admin_password: String,
|
||||||
/// Name of the site (can be changed later)
|
/// Name of the site (can be changed later)
|
||||||
#[doku(example = "My Lemmy Instance")]
|
#[doku(example = "My Lemmy Instance")]
|
||||||
pub site_name: String,
|
pub site_name: String,
|
||||||
/// Email for the admin user (optional, can be omitted and set later through the website)
|
/// Email for the admin user (optional, can be omitted and set later through the website)
|
||||||
|
#[doku(example = "user@example.com")]
|
||||||
#[default(None)]
|
#[default(None)]
|
||||||
pub admin_email: Option<String>,
|
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>,
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user