feat: pivot to social media workflow app
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
using Azure.Identity;
|
||||
using Hutopy;
|
||||
using Hutopy.Infrastructure;
|
||||
using Hutopy.Modules.Contents;
|
||||
using Hutopy.Modules.Contents.Data;
|
||||
using Hutopy.Modules.Creators;
|
||||
using Hutopy.Modules.Creators.Data;
|
||||
using Hutopy.Modules.Identity;
|
||||
using Hutopy.Modules.Identity.Data;
|
||||
using Hutopy.Modules.Memberships;
|
||||
using Hutopy.Modules.Memberships.Data;
|
||||
using Hutopy.Modules.Messaging;
|
||||
using Hutopy.Modules.Messaging.Data;
|
||||
using Hutopy.Modules.Tipping;
|
||||
using Hutopy.Modules.Tipping.Data;
|
||||
using Socialize;
|
||||
using Socialize.Data;
|
||||
using Socialize.Infrastructure;
|
||||
using Socialize.Infrastructure.Development;
|
||||
using Socialize.Modules.Approvals;
|
||||
using Socialize.Modules.Assets;
|
||||
using Socialize.Modules.Clients;
|
||||
using Socialize.Modules.Comments;
|
||||
using Socialize.Modules.ContentItems;
|
||||
using Socialize.Modules.Identity;
|
||||
using Socialize.Modules.Notifications;
|
||||
using Socialize.Modules.Projects;
|
||||
using Socialize.Modules.Workspaces;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
using NSwag;
|
||||
using NSwag.Generation.AspNetCore.Processors;
|
||||
@@ -52,7 +51,7 @@ builder.Services.AddOpenApiDocument((
|
||||
configure,
|
||||
_) =>
|
||||
{
|
||||
configure.Title = "Hutopy API";
|
||||
configure.Title = "Socialize API";
|
||||
|
||||
// Add JWT
|
||||
configure.AddSecurity(
|
||||
@@ -75,30 +74,17 @@ string postgresConnectionString = builder.Configuration.GetConnectionString("Pos
|
||||
"Missing ConnectionStrings:PostgresConnection");
|
||||
|
||||
builder.Services.AddFastEndpoints();
|
||||
builder.Services.AddAppData(postgresConnectionString);
|
||||
builder.AddInfrastructureModule();
|
||||
builder.AddIdentityModule(options =>
|
||||
options.UseNpgsql(
|
||||
postgresConnectionString,
|
||||
o => o.MigrationsHistoryTable("__EFMigrationsHistory", IdentityDbContext.SchemaName)));
|
||||
builder.AddCreatorModule(options =>
|
||||
options.UseNpgsql(
|
||||
postgresConnectionString,
|
||||
o => o.MigrationsHistoryTable("__EFMigrationsHistory", CreatorsDbContext.SchemaName)));
|
||||
builder.AddContentModule(options =>
|
||||
options.UseNpgsql(
|
||||
postgresConnectionString,
|
||||
o => o.MigrationsHistoryTable("__EFMigrationsHistory", ContentsDbContext.SchemaName)));
|
||||
builder.AddMembershipModule(options => options.UseNpgsql(
|
||||
postgresConnectionString,
|
||||
o => o.MigrationsHistoryTable("__EFMigrationsHistory", MembershipsDbContext.SchemaName)));
|
||||
builder.AddTippingModule(options =>
|
||||
options.UseNpgsql(
|
||||
postgresConnectionString,
|
||||
o => o.MigrationsHistoryTable("__EFMigrationsHistory", TippingDbContext.SchemaName)));
|
||||
builder.AddMessagingModule(options =>
|
||||
options.UseNpgsql(
|
||||
postgresConnectionString,
|
||||
o => o.MigrationsHistoryTable("__EFMigrationsHistory", MessagingDbContext.SchemaName)));
|
||||
builder.AddIdentityModule();
|
||||
builder.AddWorkspaceModule();
|
||||
builder.AddClientsModule();
|
||||
builder.AddProjectsModule();
|
||||
builder.AddContentItemsModule();
|
||||
builder.AddAssetsModule();
|
||||
builder.AddCommentsModule();
|
||||
builder.AddApprovalsModule();
|
||||
builder.AddNotificationsModule();
|
||||
|
||||
WebApplication app = builder.Build();
|
||||
|
||||
@@ -112,12 +98,9 @@ app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
|
||||
// Initialize and seed the db.
|
||||
await app.UseAppDataAsync();
|
||||
await app.UseIdentityModuleAsync();
|
||||
await app.UseCreatorModuleAsync();
|
||||
await app.UseContentModuleAsync();
|
||||
await app.UseMembershipModuleAsync();
|
||||
await app.UseTippingModuleAsync();
|
||||
await app.UseMessagingModuleAsync();
|
||||
await app.UseDevelopmentSeedAsync();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (!app.Environment.IsDevelopment())
|
||||
@@ -127,7 +110,11 @@ if (!app.Environment.IsDevelopment())
|
||||
}
|
||||
|
||||
app.UseHealthChecks("/health");
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
if (!app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseHttpsRedirection();
|
||||
}
|
||||
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user