Skip to content

Commit

Permalink
Automated dotnet-format update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Apr 8, 2024
1 parent c4c376c commit 7cfbaaa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using BUTR.CrashReport.Bannerlord.Parser;
using BUTR.CrashReport.Models;
using BUTR.CrashReport.Renderer.Html;
using BUTR.CrashReportServer.Contexts;
using BUTR.CrashReportServer.Extensions;
using BUTR.CrashReportServer.Models.Database;
Expand All @@ -25,7 +26,6 @@
using System.Text.Json.Serialization;
using System.Threading;
using System.Threading.Tasks;
using BUTR.CrashReport.Renderer.Html;

namespace BUTR.CrashReportServer.Controllers;

Expand Down Expand Up @@ -116,7 +116,7 @@ private async Task<IActionResult> UploadJsonAsync(CancellationToken ct)
{
if (Request.Headers.ContentEncoding.Any(x => x?.Equals("gzip,deflate", StringComparison.OrdinalIgnoreCase) == true))
Request.Body = await _gZipCompressor.DecompressAsync(Request.Body, ct);

if (await HttpContext.Request.ReadFromJsonAsync<CrashReportUploadBody>(_jsonSerializerOptions, ct) is not { CrashReport: { } crashReport, LogSources: { } logSources })
return StatusCode(StatusCodes.Status500InternalServerError);

Expand All @@ -138,7 +138,7 @@ private async Task<IActionResult> UploadJsonAsync(CancellationToken ct)

return Ok($"{_options.BaseUri}/{idEntity.FileId}");
}

private static async Task<string> CompressJson(string jsonModel)
{
using var compressedBase64Stream = new MemoryStream();
Expand Down
4 changes: 2 additions & 2 deletions src/BUTR.CrashReportServer/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc.Formatters;
using Microsoft.AspNetCore.ResponseCompression;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -23,7 +24,6 @@
using System.Security.Cryptography;
using System.Text.Json;
using System.Text.Json.Serialization;
using Microsoft.AspNetCore.ResponseCompression;

namespace BUTR.CrashReportServer;

Expand Down Expand Up @@ -131,7 +131,7 @@ public void ConfigureServices(IServiceCollection services)
options.Level = CompressionLevel.SmallestSize;
});
*/

services.AddResponseCaching();
}

Expand Down

0 comments on commit 7cfbaaa

Please sign in to comment.