Skip to content

Commit

Permalink
fix(backend): correct casing for configuration params
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnisDa committed Aug 16, 2023
1 parent 71627f3 commit d6c463f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 5 additions & 2 deletions apps/backend/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -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<String>,
}

#[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_")]
Expand Down
7 changes: 1 addition & 6 deletions docs/includes/backend-config-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d6c463f

Please sign in to comment.