some changes
This commit is contained in:
parent
4ec9720541
commit
b47bac67ca
37 changed files with 397 additions and 190 deletions
|
@ -1,9 +1,12 @@
|
|||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Channels;
|
||||
using Femto.Api;
|
||||
using Femto.Api.Auth;
|
||||
using Femto.Api.Infrastructure;
|
||||
using Femto.Common;
|
||||
using Femto.Common.Domain;
|
||||
using Femto.Common.Integration;
|
||||
using Femto.Modules.Auth.Application;
|
||||
using Femto.Modules.Blog.Application;
|
||||
using Femto.Modules.Media.Application;
|
||||
|
@ -27,9 +30,12 @@ if (blobStorageRoot is null)
|
|||
throw new Exception("no blob storage root found");
|
||||
|
||||
|
||||
builder.Services.InitializeBlogModule(connectionString);
|
||||
var eventBus = new EventBus(Channel.CreateUnbounded<IEvent>());
|
||||
builder.Services.AddHostedService(_ => eventBus);
|
||||
|
||||
builder.Services.InitializeBlogModule(connectionString, eventBus);
|
||||
builder.Services.InitializeMediaModule(connectionString, blobStorageRoot);
|
||||
builder.Services.InitializeAuthenticationModule(connectionString);
|
||||
builder.Services.InitializeAuthenticationModule(connectionString, eventBus);
|
||||
|
||||
builder.Services.AddScoped<CurrentUserContext, CurrentUserContext>();
|
||||
builder.Services.AddScoped<ICurrentUserContext>(s => s.GetRequiredService<CurrentUserContext>());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue