From d6c463f2fa85d420e1cebb02e420fb9492fef4f7 Mon Sep 17 00:00:00 2001 From: Diptesh Choudhuri Date: Wed, 16 Aug 2023 21:42:43 +0530 Subject: [PATCH] fix(backend): correct casing for configuration params --- apps/backend/src/config.rs | 7 +++++-- docs/includes/backend-config-schema.ts | 7 +------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/apps/backend/src/config.rs b/apps/backend/src/config.rs index cb1e7857fa..b6c78ed65f 100644 --- a/apps/backend/src/config.rs +++ b/apps/backend/src/config.rs @@ -142,6 +142,8 @@ pub struct MoviesTmdbConfig { pub locale: String, } +impl IsFeatureEnabled for MovieConfig {} + #[derive(Debug, Serialize, Deserialize, Clone, Config)] pub struct MovieConfig { /// Settings related to TMDB (movies). @@ -150,20 +152,21 @@ pub struct MovieConfig { } #[derive(Debug, Serialize, Deserialize, Clone, Config)] -#[config(rename_all = "snake_case", env_prefix = "MUSIC_BRAINZ_")] +#[config(rename_all = "snake_case", env_prefix = "MUSIC_MUSIC_BRAINZ_")] pub struct MusicBrainzConfig { /// Used for changing the user agent if your requests are being rate limited. pub user_agent: Option, } #[derive(Debug, Serialize, Deserialize, Clone, Config)] +#[config(rename_all = "snake_case")] pub struct MusicConfig { /// Settings related to Music Brainz. #[setting(nested)] pub music_brainz: MusicBrainzConfig, } -impl IsFeatureEnabled for MovieConfig {} +impl IsFeatureEnabled for MusicConfig {} #[derive(Debug, Serialize, Deserialize, Clone, Config)] #[config(rename_all = "snake_case", env_prefix = "MANGA_ANILIST_")] diff --git a/docs/includes/backend-config-schema.ts b/docs/includes/backend-config-schema.ts index 43900596c0..bc01011496 100644 --- a/docs/includes/backend-config-schema.ts +++ b/docs/includes/backend-config-schema.ts @@ -138,13 +138,8 @@ export interface MusicBrainzConfig { } export interface MusicConfig { -<<<<<<< HEAD - /** Settings related to LastFM. */ - last_fm: LastFmConfig; -======= /** Settings related to Music Brainz. */ - musicBrainz: MusicBrainzConfig; ->>>>>>> parent of b3a1baa... refactor(backend): rewrite to use LastFm instead of MusicBrainz + music_brainz: MusicBrainzConfig; } export interface ITunesConfig {