add version 0.17.20.30
parent
25519293ea
commit
ca3959c60c
|
@ -29,13 +29,13 @@ public class AuthController : ICarterModule
|
||||||
.WithDisplayName("ForgetPassword")
|
.WithDisplayName("ForgetPassword")
|
||||||
.HasApiVersion(1.0);
|
.HasApiVersion(1.0);
|
||||||
|
|
||||||
group.MapPost("signup", SignUpComplex)
|
group.MapPost("signup", SignUpUser)
|
||||||
.WithDisplayName("SignUp")
|
.WithDisplayName("SignUp")
|
||||||
.RequireAuthorization(builder => builder.AddAuthenticationSchemes("Bearer").RequireAuthenticatedUser())
|
.RequireAuthorization(builder => builder.AddAuthenticationSchemes("Bearer").RequireAuthenticatedUser())
|
||||||
.HasApiVersion(1.0);
|
.HasApiVersion(1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<IResult> SignUpComplex([FromBody] SignUpRequestDto request, IAccountService accountService, CancellationToken cancellationToken) =>
|
public async Task<IResult> SignUpUser([FromBody] SignUpRequestDto request, IAccountService accountService, CancellationToken cancellationToken) =>
|
||||||
TypedResults.Ok(await accountService.CompleteSignUpAsync(request, cancellationToken));
|
TypedResults.Ok(await accountService.CompleteSignUpAsync(request, cancellationToken));
|
||||||
|
|
||||||
public async Task<IResult> LoginWithPassword([FromBody] LoginRequestDto loginRequestDto, IAccountService accountService, CancellationToken cancellationToken) =>
|
public async Task<IResult> LoginWithPassword([FromBody] LoginRequestDto loginRequestDto, IAccountService accountService, CancellationToken cancellationToken) =>
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<InvariantGlobalization>true</InvariantGlobalization>
|
<InvariantGlobalization>true</InvariantGlobalization>
|
||||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||||
<AssemblyVersion>0.17.20.29</AssemblyVersion>
|
<AssemblyVersion>0.17.20.30</AssemblyVersion>
|
||||||
<FileVersion>0.17.20.29</FileVersion>
|
<FileVersion>0.17.20.30</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -23,13 +23,12 @@ builder.Services.Configure<ShopSettings>(configuration.GetSection(nameof(ShopSet
|
||||||
// Add services to the container.
|
// Add services to the container.
|
||||||
|
|
||||||
builder.Services.AddControllers();
|
builder.Services.AddControllers();
|
||||||
builder.Services.AddCustomCores();
|
//builder.Services.AddCustomCores();
|
||||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||||
builder.Services.AddEndpointsApiExplorer();
|
builder.Services.AddEndpointsApiExplorer();
|
||||||
builder.Services.AddCustomSwagger(siteSetting!.BaseUrl);
|
builder.Services.AddCustomSwagger(siteSetting!.BaseUrl);
|
||||||
builder.Services.AddCustomApiVersioning();
|
builder.Services.AddCustomApiVersioning();
|
||||||
builder.Services.AddCustomController();
|
builder.Services.AddCustomController();
|
||||||
builder.Services.AddControllers();
|
|
||||||
builder.Services.AddCustomResponseCompression();
|
builder.Services.AddCustomResponseCompression();
|
||||||
builder.Services.AddValidatorsFromAssembly(typeof(RepositoryConfig).Assembly, includeInternalTypes: true);
|
builder.Services.AddValidatorsFromAssembly(typeof(RepositoryConfig).Assembly, includeInternalTypes: true);
|
||||||
builder.Services.AddCustomMvc();
|
builder.Services.AddCustomMvc();
|
||||||
|
@ -102,7 +101,11 @@ if (app.Environment.IsDevelopment())
|
||||||
//app.UseSwagger();
|
//app.UseSwagger();
|
||||||
//app.UseSwaggerUI();
|
//app.UseSwaggerUI();
|
||||||
}
|
}
|
||||||
app.UseCors("CorsPolicy");
|
app.UseCors(x => x
|
||||||
|
.SetIsOriginAllowed(origin => true)
|
||||||
|
.AllowAnyMethod()
|
||||||
|
.AllowAnyHeader()
|
||||||
|
.AllowCredentials());
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
|
|
||||||
app.UseCustomSwagger(siteSetting.BaseUrl);
|
app.UseCustomSwagger(siteSetting.BaseUrl);
|
||||||
|
|
|
@ -94,6 +94,8 @@ public static class ServiceExtensions
|
||||||
builder =>
|
builder =>
|
||||||
{
|
{
|
||||||
builder.AllowAnyMethod()
|
builder.AllowAnyMethod()
|
||||||
|
.SetPreflightMaxAge(TimeSpan.FromHours(24))
|
||||||
|
.WithExposedHeaders("Access-control-allow-origins")
|
||||||
.AllowAnyHeader()
|
.AllowAnyHeader()
|
||||||
.SetIsOriginAllowed(_ => true)
|
.SetIsOriginAllowed(_ => true)
|
||||||
.AllowCredentials();
|
.AllowCredentials();
|
||||||
|
|
Loading…
Reference in New Issue