Fetch more data for moderation endpoints (#4727)

* Moderation endpoints fetch ownership data

* fix up endpoint configs

* add some docs
This commit is contained in:
aecsocket
2025-11-07 10:50:29 -08:00
committed by GitHub
parent a261598e89
commit 608ab988f0
6 changed files with 205 additions and 43 deletions

View File

@@ -773,20 +773,20 @@ impl AutomatedModerationQueue {
}
}
#[derive(Serialize, Deserialize)]
#[derive(Debug, Serialize, Deserialize, utoipa::ToSchema)]
pub struct MissingMetadata {
pub identified: HashMap<String, IdentifiedFile>,
pub flame_files: HashMap<String, MissingMetadataFlame>,
pub unknown_files: HashMap<String, String>,
}
#[derive(Serialize, Deserialize)]
#[derive(Debug, Serialize, Deserialize, utoipa::ToSchema)]
pub struct IdentifiedFile {
pub file_name: String,
pub status: ApprovalType,
}
#[derive(Serialize, Deserialize)]
#[derive(Debug, Serialize, Deserialize, utoipa::ToSchema)]
pub struct MissingMetadataFlame {
pub title: String,
pub file_name: String,
@@ -794,7 +794,9 @@ pub struct MissingMetadataFlame {
pub id: u32,
}
#[derive(Deserialize, Serialize, Copy, Clone, PartialEq, Eq, Debug)]
#[derive(
Deserialize, Serialize, Copy, Clone, PartialEq, Eq, Debug, utoipa::ToSchema,
)]
#[serde(rename_all = "kebab-case")]
pub enum ApprovalType {
Yes,