INNER CODE UNIT · Rust
post_aigc_flag
zly2006/zhihu-plus-plus · aigc-vote-server/src/lib.rs:282
async fn post_aigc_flag(
State(state): State<AppState>,
AxumPath((content_type, content_id)): AxumPath<(String, String)>,
Json(request): Json<AigcFlagRequest>,
) -> Result<Json<AigcFlagResponse>, ServiceError> {
validate_client_id(&request.client_id)?;
validate_content_identity(&content_type, &content_id)?;
validate_flag_request(&request)?;
Ok(Json(
state
.store
.submit_aigc_flag(content_type, content_id, request)
.await?,
))
}
async fn get_flag_status(