Skip to content

Commit

Permalink
Modify Partitions controller to ensure that a dictionary is provided …
Browse files Browse the repository at this point in the history
…for additionalParameters to prevent need for downstream null reference checks.
  • Loading branch information
gmcelhanon committed Oct 23, 2024
1 parent 90c30ca commit fd6d72a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ public PartitionsController(
[HttpGet]
public async Task<IActionResult> Get(
[FromQuery] int? number,
[FromQuery] Dictionary<string, string> additionalParameters = default)
[FromQuery] Dictionary<string, string> additionalParameters)
{
// Store alternative auth approach decision into call context
if (additionalParameters?.TryGetValue("useJoinAuth", out string useJoinAuth) == true)
if (additionalParameters.TryGetValue("useJoinAuth", out string useJoinAuth) == true)
{
_contextStorage.SetValue("UseJoinAuth", Convert.ToBoolean(useJoinAuth));
}
Expand Down

0 comments on commit fd6d72a

Please sign in to comment.