Trait lemmy_db_queries::Reportable [−][src]
pub trait Reportable {
type Form;
fn report(conn: &PgConnection, form: &Self::Form) -> Result<Self, Error>
where
Self: Sized;
fn resolve(
conn: &PgConnection,
report_id: i32,
resolver_id: PersonId
) -> Result<usize, Error>
where
Self: Sized;
fn unresolve(
conn: &PgConnection,
report_id: i32,
resolver_id: PersonId
) -> Result<usize, Error>
where
Self: Sized;
}
Associated Types
Required methods
Implementations on Foreign Types
fn report(
conn: &PgConnection,
comment_report_form: &CommentReportForm
) -> Result<Self, Error>
fn report(
conn: &PgConnection,
comment_report_form: &CommentReportForm
) -> Result<Self, Error>
creates a comment report and returns it
conn
- the postgres connectioncomment_report_form
- the filled CommentReportForm to insert
resolve a comment report
conn
- the postgres connectionreport_id
- the id of the report to resolveby_resolver_id
- the id of the user resolving the report
unresolve a comment report
conn
- the postgres connectionreport_id
- the id of the report to unresolveby_resolver_id
- the id of the user unresolving the report
type Form = CommentReportForm
creates a post report and returns it
conn
- the postgres connectionpost_report_form
- the filled CommentReportForm to insert
resolve a post report
conn
- the postgres connectionreport_id
- the id of the report to resolveby_resolver_id
- the id of the user resolving the report
resolve a post report
conn
- the postgres connectionreport_id
- the id of the report to unresolveby_resolver_id
- the id of the user unresolving the report