]> Untitled Git - lemmy.git/blobdiff - crates/db_queries/src/source/community.rs
Use Url type for ap_id fields in database (fixes #1364)
[lemmy.git] / crates / db_queries / src / source / community.rs
index 28245d8dc358f2db41a8181101c2f52d221a1902..bb7a9c240cb3f7a121b141f74bb757c10057983d 100644 (file)
@@ -12,6 +12,7 @@ use lemmy_db_schema::{
     CommunityUserBan,
     CommunityUserBanForm,
   },
+  Url,
 };
 
 mod safe_type {
@@ -91,7 +92,7 @@ impl Crud<CommunityForm> for Community {
 }
 
 impl ApubObject<CommunityForm> for Community {
-  fn read_from_apub_id(conn: &PgConnection, for_actor_id: &str) -> Result<Self, Error> {
+  fn read_from_apub_id(conn: &PgConnection, for_actor_id: &Url) -> Result<Self, Error> {
     use lemmy_db_schema::schema::community::dsl::*;
     community
       .filter(actor_id.eq(for_actor_id))