mirror of https://github.com/LemmyNet/lemmy.git
Remove pointless trait.
parent
a73e387ead
commit
e175742c4f
|
@ -22,7 +22,6 @@ use lemmy_apub::{
|
||||||
objects::{community::ApubCommunity, person::ApubPerson},
|
objects::{community::ApubCommunity, person::ApubPerson},
|
||||||
};
|
};
|
||||||
use lemmy_db_schema::{
|
use lemmy_db_schema::{
|
||||||
impls::community::CommunityModerator_,
|
|
||||||
source::{
|
source::{
|
||||||
comment::Comment,
|
comment::Comment,
|
||||||
community::{
|
community::{
|
||||||
|
|
|
@ -25,7 +25,6 @@ use lemmy_apub_lib::{
|
||||||
values::PublicUrl,
|
values::PublicUrl,
|
||||||
};
|
};
|
||||||
use lemmy_db_schema::{
|
use lemmy_db_schema::{
|
||||||
impls::community::CommunityModerator_,
|
|
||||||
source::community::{CommunityModerator, CommunityModeratorForm},
|
source::community::{CommunityModerator, CommunityModeratorForm},
|
||||||
traits::Joinable,
|
traits::Joinable,
|
||||||
};
|
};
|
||||||
|
|
|
@ -204,19 +204,8 @@ impl DeleteableOrRemoveable for Community {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait CommunityModerator_ {
|
impl CommunityModerator {
|
||||||
fn delete_for_community(
|
pub fn delete_for_community(
|
||||||
conn: &PgConnection,
|
|
||||||
for_community_id: CommunityId,
|
|
||||||
) -> Result<usize, Error>;
|
|
||||||
fn get_person_moderated_communities(
|
|
||||||
conn: &PgConnection,
|
|
||||||
for_person_id: PersonId,
|
|
||||||
) -> Result<Vec<CommunityId>, Error>;
|
|
||||||
}
|
|
||||||
|
|
||||||
impl CommunityModerator_ for CommunityModerator {
|
|
||||||
fn delete_for_community(
|
|
||||||
conn: &PgConnection,
|
conn: &PgConnection,
|
||||||
for_community_id: CommunityId,
|
for_community_id: CommunityId,
|
||||||
) -> Result<usize, Error> {
|
) -> Result<usize, Error> {
|
||||||
|
@ -224,7 +213,7 @@ impl CommunityModerator_ for CommunityModerator {
|
||||||
diesel::delete(community_moderator.filter(community_id.eq(for_community_id))).execute(conn)
|
diesel::delete(community_moderator.filter(community_id.eq(for_community_id))).execute(conn)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_person_moderated_communities(
|
pub fn get_person_moderated_communities(
|
||||||
conn: &PgConnection,
|
conn: &PgConnection,
|
||||||
for_person_id: PersonId,
|
for_person_id: PersonId,
|
||||||
) -> Result<Vec<CommunityId>, Error> {
|
) -> Result<Vec<CommunityId>, Error> {
|
||||||
|
|
Loading…
Reference in New Issue