refactor: Refactored the IndexerTestResut model into the general Servarr models
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use std::fmt::{Display, Formatter};
|
||||
|
||||
use crate::models::servarr_models::IndexerTestResult;
|
||||
use crate::{models::HorizontallyScrollableText, serde_enum_from};
|
||||
use chrono::{DateTime, Utc};
|
||||
use clap::ValueEnum;
|
||||
@@ -216,23 +217,6 @@ pub struct IndexerSettings {
|
||||
pub whitelisted_hardcoded_subs: HorizontallyScrollableText,
|
||||
}
|
||||
|
||||
#[derive(Default, Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct IndexerTestResult {
|
||||
#[serde(deserialize_with = "super::from_i64")]
|
||||
pub id: i64,
|
||||
pub is_valid: bool,
|
||||
pub validation_failures: Vec<IndexerValidationFailure>,
|
||||
}
|
||||
|
||||
#[derive(Default, Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct IndexerValidationFailure {
|
||||
pub property_name: String,
|
||||
pub error_message: String,
|
||||
pub severity: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Derivative, Debug, Clone, PartialEq, Eq)]
|
||||
#[derivative(Default)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
|
||||
Reference in New Issue
Block a user