diff options
author | Dessalines <happydooby@gmail.com> | 2019-08-11 20:55:09 -0700 |
---|---|---|
committer | Dessalines <happydooby@gmail.com> | 2019-08-11 20:55:09 -0700 |
commit | 3246d5d670d0d5e10310a90c6fd81a7dc9e97e54 (patch) | |
tree | 60bdf51e980fa9abe6fe9f1bae39373452afb155 /server/src/db/community.rs | |
parent | c2cb36bfa4bd8e55fbdbde51bd9fbfd2554ccfa4 (diff) |
nsfw mostly done, except for settings page.
Diffstat (limited to 'server/src/db/community.rs')
-rw-r--r-- | server/src/db/community.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/src/db/community.rs b/server/src/db/community.rs index b32230b9..aa28c9c7 100644 --- a/server/src/db/community.rs +++ b/server/src/db/community.rs @@ -14,6 +14,7 @@ pub struct Community { pub published: chrono::NaiveDateTime, pub updated: Option<chrono::NaiveDateTime>, pub deleted: bool, + pub nsfw: bool, } #[derive(Insertable, AsChangeset, Clone, Serialize, Deserialize)] @@ -27,6 +28,7 @@ pub struct CommunityForm { pub removed: Option<bool>, pub updated: Option<chrono::NaiveDateTime>, pub deleted: Option<bool>, + pub nsfw: bool, } impl Crud<CommunityForm> for Community { @@ -240,6 +242,7 @@ mod tests { title: "nada".to_owned(), description: None, category_id: 1, + nsfw: false, removed: None, deleted: None, updated: None, @@ -254,6 +257,7 @@ mod tests { title: "nada".to_owned(), description: None, category_id: 1, + nsfw: false, removed: false, deleted: false, published: inserted_community.published, |