summaryrefslogtreecommitdiffstats
path: root/server/src/db/community.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/db/community.rs')
-rw-r--r--server/src/db/community.rs4
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,