refactor: remove unnecessary serde renaming annotations from Config struct
This commit is contained in:
@@ -33,34 +33,20 @@ pub struct ThumbnailConfig {
|
|||||||
|
|
||||||
#[derive(Deserialize, Clone)]
|
#[derive(Deserialize, Clone)]
|
||||||
pub struct Config {
|
pub struct Config {
|
||||||
#[serde(rename = "DATABASE_URL")]
|
|
||||||
pub database_url: String,
|
pub database_url: String,
|
||||||
|
|
||||||
#[serde(rename = "DATABASE_DB_TYPE")]
|
|
||||||
pub database_db_type: DatabaseType,
|
pub database_db_type: DatabaseType,
|
||||||
|
|
||||||
#[serde(rename = "SERVER_ADDRESS")]
|
|
||||||
pub server_address: String,
|
pub server_address: String,
|
||||||
|
|
||||||
#[serde(rename = "JWT_SECRET")]
|
|
||||||
pub jwt_secret: String,
|
pub jwt_secret: String,
|
||||||
|
|
||||||
#[serde(rename = "MEDIA_LIBRARY_PATH")]
|
|
||||||
pub media_library_path: String,
|
pub media_library_path: String,
|
||||||
|
|
||||||
#[serde(rename = "BROKER_URL")]
|
|
||||||
pub broker_url: String,
|
pub broker_url: String,
|
||||||
|
|
||||||
#[serde(default = "default_max_upload_size")]
|
#[serde(default = "default_max_upload_size")]
|
||||||
#[serde(rename = "MAX_UPLOAD_SIZE_MB")]
|
|
||||||
pub max_upload_size_mb: u32,
|
pub max_upload_size_mb: u32,
|
||||||
|
|
||||||
#[serde(default = "default_storage_quota")]
|
#[serde(default = "default_storage_quota")]
|
||||||
#[serde(rename = "DEFAULT_STORAGE_QUOTA_GB")]
|
|
||||||
pub default_storage_quota_gb: u64,
|
pub default_storage_quota_gb: u64,
|
||||||
|
|
||||||
#[serde(default = "default_allowed_sort_columns")]
|
#[serde(default = "default_allowed_sort_columns")]
|
||||||
#[serde(rename = "ALLOWED_SORT_COLUMNS")]
|
|
||||||
pub allowed_sort_columns: Vec<String>,
|
pub allowed_sort_columns: Vec<String>,
|
||||||
|
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|||||||
Reference in New Issue
Block a user