+ Tips
+ Memberships - DDD - FutureCreator - UserTransactions
This commit is contained in:
@@ -6,9 +6,10 @@ using Hutopy.Infrastructure.Identity;
|
||||
using Hutopy.Web;
|
||||
using Hutopy.Web.Features.Contents;
|
||||
using Hutopy.Web.Features.Contents.Data;
|
||||
using Hutopy.Web.Features.Memberships;
|
||||
using Hutopy.Web.Features.Memberships.Data;
|
||||
using Hutopy.Web.Features.Messages;
|
||||
using Hutopy.Web.Features.Messages.Data;
|
||||
using Hutopy.Web.Infrastructure;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
using NSwag;
|
||||
using NSwag.Generation.AspNetCore.Processors;
|
||||
@@ -51,7 +52,6 @@ builder.Services.AddCors(options =>
|
||||
// Add services to the container.
|
||||
builder.Services.AddKeyVaultIfConfigured(builder.Configuration);
|
||||
|
||||
builder.Services.AddApplicationServices();
|
||||
builder.Services.AddInfrastructureServices(builder.Configuration);
|
||||
builder.Services.AddWebServices();
|
||||
builder.Services.AddAuthorizationAndAuthentication(builder.Configuration);
|
||||
@@ -59,7 +59,9 @@ builder.Services.AddAuthorizationAndAuthentication(builder.Configuration);
|
||||
// TODO: This old tech should be remove - need to move Facebook / Google controllers to FastEndpoints
|
||||
builder.Services.AddControllers();
|
||||
|
||||
builder.Services.AddOpenApiDocument((configure, sp) =>
|
||||
builder.Services.AddOpenApiDocument((
|
||||
configure,
|
||||
sp) =>
|
||||
{
|
||||
configure.Title = "Hutopy API";
|
||||
|
||||
@@ -91,6 +93,10 @@ builder.Services.AddMessagingModule(options =>
|
||||
options.UseNpgsql(
|
||||
postgresConnectionString,
|
||||
o => o.MigrationsHistoryTable("__EFMigrationsHistory", MessagingDbContext.SchemaName)));
|
||||
builder.AddMembershipModule(
|
||||
options => options.UseNpgsql(
|
||||
postgresConnectionString,
|
||||
o => o.MigrationsHistoryTable("__EFMigrationsHistory", MembershipDbContext.SchemaName)));
|
||||
|
||||
builder.Services.Configure<JwtOptions>(builder.Configuration.GetRequiredSection(JwtOptions.SectionName));
|
||||
|
||||
@@ -111,6 +117,7 @@ app.UseAuthorization();
|
||||
await app.InitialiseApplicationDatabaseAsync();
|
||||
await app.InitialiseContentDbContextAsync();
|
||||
await app.InitialiseMessagingDbContextAsync();
|
||||
await app.InitialiseMembershipDbContextAsync();
|
||||
await app.SeedDatabaseWithTestDataOnlyIfNoDataIsPresentAsync();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
@@ -134,10 +141,6 @@ app.MapControllerRoute(
|
||||
name: "default",
|
||||
pattern: "{controller}/{action=Index}/{id?}");
|
||||
|
||||
//TODO: validate the behavior
|
||||
// app.UseExceptionHandler();
|
||||
app.MapEndpoints();
|
||||
|
||||
app.UseFastEndpoints();
|
||||
|
||||
app.Run();
|
||||
|
||||
Reference in New Issue
Block a user