From 4edd45a147248a66aca119e895a455cded33735f Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Thu, 22 Apr 2021 13:57:55 +0200 Subject: [PATCH] address review --- crates/api_common/src/site.rs | 4 ++-- .../2021-04-20-155001_limit-admins-create-community/down.sql | 2 +- .../2021-04-20-155001_limit-admins-create-community/up.sql | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/api_common/src/site.rs b/crates/api_common/src/site.rs index e60629919..ffee7ba86 100644 --- a/crates/api_common/src/site.rs +++ b/crates/api_common/src/site.rs @@ -71,8 +71,8 @@ pub struct CreateSite { pub enable_downvotes: bool, pub open_registration: bool, pub enable_nsfw: bool, - pub auth: String, pub community_creation_admin_only: bool, + pub auth: String, } #[derive(Deserialize)] @@ -85,8 +85,8 @@ pub struct EditSite { pub enable_downvotes: bool, pub open_registration: bool, pub enable_nsfw: bool, - pub auth: String, pub community_creation_admin_only: Option, + pub auth: String, } #[derive(Deserialize)] diff --git a/migrations/2021-04-20-155001_limit-admins-create-community/down.sql b/migrations/2021-04-20-155001_limit-admins-create-community/down.sql index 14dc01015..a04036f4f 100644 --- a/migrations/2021-04-20-155001_limit-admins-create-community/down.sql +++ b/migrations/2021-04-20-155001_limit-admins-create-community/down.sql @@ -1 +1 @@ -ALTER TABLE site DROP COLUMN community_creation_admin_only; \ No newline at end of file +ALTER TABLE site DROP COLUMN community_creation_admin_only; diff --git a/migrations/2021-04-20-155001_limit-admins-create-community/up.sql b/migrations/2021-04-20-155001_limit-admins-create-community/up.sql index c121c2cb6..f302f88af 100644 --- a/migrations/2021-04-20-155001_limit-admins-create-community/up.sql +++ b/migrations/2021-04-20-155001_limit-admins-create-community/up.sql @@ -1 +1 @@ -ALTER TABLE site ADD COLUMN community_creation_admin_only bool NOT NULL; \ No newline at end of file +ALTER TABLE site ADD COLUMN community_creation_admin_only bool NOT NULL DEFAULT false;