Skip to content

Commit

Permalink
Merge pull request #13 from BUTR/code-formatting/fix-codeformatting
Browse files Browse the repository at this point in the history
Automated PR to fix formatting errors
  • Loading branch information
Aragas authored Mar 4, 2024
2 parents 1eaabcb + b5573ba commit c5b50f8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public async Task<IActionResult> UploadAsync(CancellationToken ct)
var converted = Image.LoadPixelData<Bgra32>(MemoryMarshal.Cast<Rgba32, byte>(memory.Span), image.Width, image.Height);
await using var stream = _recyclableMemoryStreamManager.GetStream();
await converted.SaveAsWebpAsync(stream, cancellationToken: ct);

var id = Guid.NewGuid().ToString();
await _cache.SetAsync($"avatar_{id}", stream.ToArray(), new DistributedCacheEntryOptions
{
Expand Down
4 changes: 2 additions & 2 deletions src/BUTR.ModListServer/Options/ConnectionStringsOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ public sealed class ConnectionStringsOptionsValidator : AbstractValidator<Connec
{
public ConnectionStringsOptionsValidator()
{
RuleFor(x => x.Main).NotEmpty();
}
RuleFor(x => x.Main).NotEmpty();
}
}

public sealed record ConnectionStringsOptions
Expand Down
4 changes: 2 additions & 2 deletions src/BUTR.ModListServer/Options/ModListUploadOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ public sealed class ModListUploadOptionsValidator : AbstractValidator<ModListUpl
{
public ModListUploadOptionsValidator()
{
RuleFor(x => x.BaseUri).NotEmpty();
}
RuleFor(x => x.BaseUri).NotEmpty();
}
}

public record ModListUploadOptions
Expand Down
2 changes: 1 addition & 1 deletion src/BUTR.ModListServer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static async Task Main(string[] args)
.Enrich.FromLogContext()
.WriteTo.Console()
.CreateBootstrapLogger();

try
{
Log.Information("Starting web application");
Expand Down
8 changes: 4 additions & 4 deletions src/BUTR.ModListServer/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class Startup
{
private const string ConnectionStringsSectionName = "ConnectionStrings";
private const string ModListUploadSectionName = "ModListUpload";

private static JsonSerializerOptions Configure(JsonSerializerOptions opt)
{
opt.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;
Expand All @@ -30,7 +30,7 @@ private static JsonSerializerOptions Configure(JsonSerializerOptions opt)
opt.Converters.Add(new JsonStringEnumConverter(JsonNamingPolicy.CamelCase));
return opt;
}

private readonly string _appName;
private readonly IConfiguration _configuration;

Expand Down Expand Up @@ -81,7 +81,7 @@ public void ConfigureServices(IServiceCollection services)
});

services.AddSingleton<RecyclableMemoryStreamManager>();

services.AddEndpointsApiExplorer();
services.AddSwaggerGen(opt =>
{
Expand Down Expand Up @@ -117,7 +117,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
app.UseSwaggerUI(options => options.SwaggerEndpoint("/swagger/v1/swagger.json", _appName));

app.UseRouting();

app.UseAuthentication();
app.UseAuthorization();

Expand Down

0 comments on commit c5b50f8

Please sign in to comment.