Rename WebApi project to Vegasco.Server.Api
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
And update all references including comments etc.
This commit is contained in:
36
src/Vegasco.Server.Api/Endpoints/EndpointExtensions.cs
Normal file
36
src/Vegasco.Server.Api/Endpoints/EndpointExtensions.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user