mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-22 12:21:18 +00:00
parent
3b37ea6c8b
commit
1ee0c0c291
4 changed files with 29 additions and 11 deletions
|
@ -49,15 +49,15 @@ impl PerformCrud for GetSite {
|
|||
|
||||
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);
|
||||
|
|
|
@ -708,7 +708,7 @@ mod tests {
|
|||
);
|
||||
|
||||
// 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);
|
||||
|
|
|
@ -103,10 +103,27 @@ pub struct RateLimitConfig {
|
|||
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>,
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
admin_username: lemmy_alpha
|
||||
admin_password: lemmy
|
||||
site_name: lemmy-alpha
|
||||
sidebar: alphas sidebar
|
||||
}
|
||||
database: {
|
||||
database: lemmy
|
||||
|
|
Loading…
Reference in a new issue