]> Untitled Git - lemmy.git/blobdiff - crates/db_schema/src/impls/community.rs
Revert "Add pending, and change use specific API response for FollowCommunity…" ...
[lemmy.git] / crates / db_schema / src / impls / community.rs
index a7b50996398c59f0ec12f2a851796caab081e579..14a670f51c58ad1c7e33263b582fd8a678f879cc 100644 (file)
@@ -1,6 +1,4 @@
 use crate::{
-  functions::lower,
-  naive_now,
   newtypes::{CommunityId, DbUrl, PersonId},
   source::community::{
     Community,
@@ -14,6 +12,7 @@ use crate::{
     CommunitySafe,
   },
   traits::{ApubActor, Bannable, Crud, DeleteableOrRemoveable, Followable, Joinable},
+  utils::{functions::lower, naive_now},
 };
 use diesel::{
   dsl::*,
@@ -43,6 +42,7 @@ mod safe_type {
     icon,
     banner,
     hidden,
+    posting_restricted_to_mods,
   );
 
   impl ToSafe for Community {
@@ -63,6 +63,7 @@ mod safe_type {
         icon,
         banner,
         hidden,
+        posting_restricted_to_mods,
       )
     }
   }
@@ -325,9 +326,9 @@ impl ApubActor for Community {
 #[cfg(test)]
 mod tests {
   use crate::{
-    establish_unpooled_connection,
     source::{community::*, person::*},
     traits::{Bannable, Crud, Followable, Joinable},
+    utils::establish_unpooled_connection,
   };
   use serial_test::serial;
 
@@ -373,6 +374,7 @@ mod tests {
       inbox_url: inserted_community.inbox_url.to_owned(),
       shared_inbox_url: None,
       hidden: false,
+      posting_restricted_to_mods: false,
     };
 
     let community_follower_form = CommunityFollowerForm {