mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-22 12:21:18 +00:00
parent
60e9586530
commit
9ef0efa420
6 changed files with 7 additions and 0 deletions
|
@ -133,6 +133,7 @@ pub struct EditSite {
|
|||
pub private_instance: Option<bool>,
|
||||
pub default_theme: Option<String>,
|
||||
pub default_post_listing_type: Option<String>,
|
||||
pub legal_information: Option<String>,
|
||||
pub auth: Sensitive<String>,
|
||||
}
|
||||
|
||||
|
|
|
@ -84,6 +84,7 @@ impl PerformCrud for EditSite {
|
|||
private_instance: data.private_instance,
|
||||
default_theme: data.default_theme.clone(),
|
||||
default_post_listing_type: data.default_post_listing_type.clone(),
|
||||
legal_information: data.legal_information.clone(),
|
||||
..SiteForm::default()
|
||||
};
|
||||
|
||||
|
|
|
@ -463,6 +463,7 @@ table! {
|
|||
public_key -> Text,
|
||||
default_theme -> Text,
|
||||
default_post_listing_type -> Text,
|
||||
legal_information -> Nullable<Text>,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ pub struct Site {
|
|||
pub public_key: String,
|
||||
pub default_theme: String,
|
||||
pub default_post_listing_type: String,
|
||||
pub legal_information: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
|
@ -59,4 +60,5 @@ pub struct SiteForm {
|
|||
pub public_key: Option<String>,
|
||||
pub default_theme: Option<String>,
|
||||
pub default_post_listing_type: Option<String>,
|
||||
pub legal_information: Option<String>,
|
||||
}
|
||||
|
|
1
migrations/2022-05-19-153931_legal-information/down.sql
Normal file
1
migrations/2022-05-19-153931_legal-information/down.sql
Normal file
|
@ -0,0 +1 @@
|
|||
alter table site drop column legal_information;
|
1
migrations/2022-05-19-153931_legal-information/up.sql
Normal file
1
migrations/2022-05-19-153931_legal-information/up.sql
Normal file
|
@ -0,0 +1 @@
|
|||
alter table site add column legal_information text;
|
Loading…
Reference in a new issue