fix(quotesdb): add PartialEq to report types, remove unused import

- Derive PartialEq on ReportSummary, ReportListResponse, ReportRow, and
  QuoteReports so they can be held in Yew state enums that require PartialEq
- Remove unused ApiError import from moderation_tab.rs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
Elijah Voigt 3 months ago
parent e134b59d05
commit d50abc5495

@ -391,7 +391,7 @@ pub async fn report_quote(
/// Summary of a reported quote in the admin reports list.
///
/// Returned by `GET /api/admin/reports`.
#[derive(Debug, Clone, Deserialize)]
#[derive(Debug, Clone, Deserialize, PartialEq)]
pub struct ReportSummary {
/// The ID of the reported quote.
pub quote_id: String,
@ -408,7 +408,7 @@ pub struct ReportSummary {
/// Paginated list of reported quotes.
///
/// Returned by `GET /api/admin/reports?page=N`.
#[derive(Debug, Clone, Deserialize)]
#[derive(Debug, Clone, Deserialize, PartialEq)]
pub struct ReportListResponse {
/// Summaries of reported quotes on this page.
pub reports: Vec<ReportSummary>,
@ -419,7 +419,7 @@ pub struct ReportListResponse {
}
/// A single report row within a quote's report detail.
#[derive(Debug, Clone, Deserialize)]
#[derive(Debug, Clone, Deserialize, PartialEq)]
pub struct ReportRow {
/// Unique report ID.
pub id: String,
@ -432,7 +432,7 @@ pub struct ReportRow {
/// Full details for a reported quote: the quote plus all individual reports.
///
/// Returned by `GET /api/admin/reports/:quote_id`.
#[derive(Debug, Clone, Deserialize)]
#[derive(Debug, Clone, Deserialize, PartialEq)]
pub struct QuoteReports {
/// The full quote object.
pub quote: quotesdb::Quote,

@ -11,7 +11,7 @@
//! }
//! ```
use crate::api::{self, ApiError, QuoteReports, ReportListResponse, ReportSummary};
use crate::api::{self, QuoteReports, ReportListResponse, ReportSummary};
use crate::components::pagination::Pagination;
use wasm_bindgen_futures::spawn_local;
use yew::prelude::*;

Loading…
Cancel
Save