use lemmy_db_schema::{
naive_now,
source::comment_report::{CommentReport, CommentReportForm},
+ CommentReportId,
PersonId,
};
impl Reportable for CommentReport {
type Form = CommentReportForm;
+ type IdType = CommentReportId;
/// creates a comment report and returns it
///
/// * `conn` - the postgres connection
/// * `by_resolver_id` - the id of the user resolving the report
fn resolve(
conn: &PgConnection,
- report_id: i32,
+ report_id: Self::IdType,
by_resolver_id: PersonId,
) -> Result<usize, Error> {
use lemmy_db_schema::schema::comment_report::dsl::*;
/// * `by_resolver_id` - the id of the user unresolving the report
fn unresolve(
conn: &PgConnection,
- report_id: i32,
+ report_id: Self::IdType,
by_resolver_id: PersonId,
) -> Result<usize, Error> {
use lemmy_db_schema::schema::comment_report::dsl::*;