Skip to content

Commit

Permalink
Remove required property from devices online
Browse files Browse the repository at this point in the history
  • Loading branch information
LucHeart committed Oct 5, 2023
1 parent 066ecfa commit 1ab992d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions API/API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<ImplicitUsings>enable</ImplicitUsings>
<AssemblyName>OpenShock.API</AssemblyName>
<RootNamespace>OpenShock.API</RootNamespace>
<AssemblyVersion>1.6.1</AssemblyVersion>
<FileVersion>1.6.1</FileVersion>
<AssemblyVersion>1.6.2</AssemblyVersion>
<FileVersion>1.6.2</FileVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Company>OpenShock</Company>
<Product>API</Product>
Expand Down
7 changes: 4 additions & 3 deletions API/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ public Startup(IConfiguration configuration)
var debugView = root.GetDebugView();
Console.WriteLine(debugView);
#endif
APIGlobals.ApiConfig = configuration.GetChildren().First(x => x.Key.ToLowerInvariant() == "openshock").Get<ApiConfig>() ??
APIGlobals.ApiConfig = configuration.GetChildren().First(x => x.Key.ToLowerInvariant() == "openshock")
.Get<ApiConfig>() ??
throw new Exception("Couldnt bind config, check config file");
}

Expand All @@ -71,7 +72,7 @@ public void ConfigureServices(IServiceCollection services)
builder.EnableSensitiveDataLogging();
builder.EnableDetailedErrors();
});

_redisConfig = new ConfigurationOptions
{
AbortOnConnectFail = true,
Expand Down Expand Up @@ -222,7 +223,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerF

app.UseForwardedHeaders(_forwardedSettings);
app.UseSerilogRequestLogging();

app.ConfigureExceptionHandler();

// global cors policy
Expand Down
2 changes: 1 addition & 1 deletion Common/Redis/DeviceOnline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ public class DeviceOnline
[RedisIdField] [Indexed] public required Guid Id { get; set; }
[Indexed] public required Guid Owner { get; set; }
public Version? FirmwareVersion { get; set; }
public required string? Gateway { get; set; }
public string? Gateway { get; set; }
}
4 changes: 2 additions & 2 deletions LiveControlGateway/LiveControlGateway.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<AssemblyName>OpenShock.LiveControlGateway</AssemblyName>
<RootNamespace>OpenShock.LiveControlGateway</RootNamespace>
<Company>OpenShock</Company>
<AssemblyVersion>1.6.1</AssemblyVersion>
<FileVersion>1.6.1</FileVersion>
<AssemblyVersion>1.6.2</AssemblyVersion>
<FileVersion>1.6.2</FileVersion>
<Product>LiveControlGateway</Product>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
Expand Down

0 comments on commit 1ab992d

Please sign in to comment.