Rename WebApi project to Vegasco.Server.Api
All checks were successful
continuous-integration/drone/push Build is passing

And update all references including comments etc.
This commit is contained in:
2025-06-12 18:22:37 +02:00
parent 9d71c86474
commit a1999bfe41
71 changed files with 177 additions and 224 deletions

View File

@@ -0,0 +1,53 @@
using Microsoft.AspNetCore.Localization;
using System.Globalization;
using Vegasco.Server.Api.Endpoints;
using Vegasco.Server.ServiceDefaults;
namespace Vegasco.Server.Api.Common;
internal static class StartupExtensions
{
internal static WebApplication ConfigureServices(this WebApplicationBuilder builder)
{
builder.AddServiceDefaults();
builder.Configuration.AddEnvironmentVariables("Vegasco_");
builder.AddApiServices();
WebApplication app = builder.Build();
return app;
}
internal static WebApplication ConfigureRequestPipeline(this WebApplication app)
{
app.UseRequestLocalization(o =>
{
o.SupportedCultures =
[
new CultureInfo("en")
];
o.SupportedUICultures = o.SupportedCultures;
CultureInfo defaultCulture = o.SupportedCultures[0];
o.DefaultRequestCulture = new RequestCulture(defaultCulture);
});
app.UseHttpsRedirection();
app.MapHealthChecks("/health");
app.UseAuthentication();
app.UseAuthorization();
app.MapEndpoints();
if (app.Environment.IsDevelopment())
{
app.MapOpenApi("/swagger/{documentName}/swagger.json");
}
return app;
}
}