Skip to content

Commit

Permalink
Fix some compilation warnings (#175)
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Thaler <[email protected]>
  • Loading branch information
dthaler authored Oct 25, 2024
1 parent ea3dceb commit 328ce40
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions OrcanodeMonitor/Api/OrcanodesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ namespace OrcanodeMonitor.Api
{
public class ErrorResponse
{
public List<ErrorItem> Errors { get; set; }
public List<ErrorItem> Errors { get; set; } = new List<ErrorItem>();
}

public class ErrorItem
{
public string Message { get; set; }
public string Message { get; set; } = string.Empty;
}

[Route("api/ifttt/v1/queries/[controller]")]
Expand Down
1 change: 1 addition & 0 deletions OrcanodeMonitor/Models/Orcanode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public class Orcanode
public Orcanode()
{
// Initialize reference types.
ID = string.Empty;
OrcasoundName = string.Empty;
OrcasoundSlug = string.Empty;
OrcasoundFeedId = string.Empty;
Expand Down
6 changes: 1 addition & 5 deletions OrcanodeMonitor/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@
connection = builder.Configuration.GetConnectionString("OrcanodeMonitorContext") ?? throw new InvalidOperationException("Connection string 'OrcanodeMonitorContext' not found.");
}

var databaseName = Environment.GetEnvironmentVariable("AZURE_COSMOS_DATABASENAME");
if (databaseName.IsNullOrEmpty())
{
databaseName = "orcasound-cosmosdb";
}
string databaseName = Environment.GetEnvironmentVariable("AZURE_COSMOS_DATABASENAME") ?? "orcasound-cosmosdb";

// Add services to the container.
builder.Services.AddRazorPages();
Expand Down

0 comments on commit 328ce40

Please sign in to comment.