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,36 @@
using Asp.Versioning.Builder;
using Asp.Versioning.Conventions;
using Vegasco.Server.Api.Cars;
using Vegasco.Server.Api.Common;
using Vegasco.Server.Api.Consumptions;
using Vegasco.Server.Api.Info;
namespace Vegasco.Server.Api.Endpoints;
public static class EndpointExtensions
{
public static void MapEndpoints(this IEndpointRouteBuilder builder)
{
ApiVersionSet apiVersionSet = builder.NewApiVersionSet()
.HasApiVersion(1.0)
.Build();
RouteGroupBuilder versionedApis = builder.MapGroup("/v{apiVersion:apiVersion}")
.WithApiVersionSet(apiVersionSet)
.RequireAuthorization(Constants.Authorization.RequireAuthenticatedUserPolicy);
GetCar.MapEndpoint(versionedApis);
GetCars.MapEndpoint(versionedApis);
CreateCar.MapEndpoint(versionedApis);
UpdateCar.MapEndpoint(versionedApis);
DeleteCar.MapEndpoint(versionedApis);
GetConsumptions.MapEndpoint(versionedApis);
GetConsumption.MapEndpoint(versionedApis);
CreateConsumption.MapEndpoint(versionedApis);
UpdateConsumption.MapEndpoint(versionedApis);
DeleteConsumption.MapEndpoint(versionedApis);
GetServerInfo.MapEndpoint(versionedApis);
}
}