Skip to content

Commit

Permalink
Fixes an obscure bug that was discovered by @TWM617 - if a configurat…
Browse files Browse the repository at this point in the history
…ion section is missing (such as newly introduced integrations) it should not be defaulted to true. The new configuration validation feature revealed this problem as it validates enabled integration apis for proper settings on startup.
  • Loading branch information
replaysMike committed May 13, 2023
1 parent 0778401 commit 1e45c08
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Binner/Binner.Web/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"ApiUrl": "https://api.mouser.com"
},
"Arrow": {
"Enabled": false,
"Enabled": true,
// Arrow API Keys can be obtained at https://developers.arrow.com/api/index.php/site/page?view=requestAPIKey
"ApiKey": "",
"Username": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/// </summary>
public class ArrowConfiguration : IApiConfiguration
{
public bool Enabled { get; set; } = true;
public bool Enabled { get; set; } = false;

/// <summary>
/// Your arrow.com account username/login
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/// </summary>
public class DigikeyConfiguration : IApiConfiguration
{
public bool Enabled { get; set; } = true;
public bool Enabled { get; set; } = false;

public string? ApiKey => ClientId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/// </summary>
public class MouserConfiguration : IApiConfiguration
{
public bool Enabled { get; set; } = true;
public bool Enabled { get; set; } = false;

public string? ApiKey => ApiKeys.SearchApiKey;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/// </summary>
public class SwarmConfiguration : IApiConfiguration
{
public bool Enabled { get; set; } = true;
public bool Enabled { get; set; } = false;

/// <summary>
/// The optional api key
Expand Down

1 comment on commit 1e45c08

@TWM617
Copy link

@TWM617 TWM617 commented on 1e45c08 May 13, 2023 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.