Added audit log
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
using HopFrame.Core.Services;
|
||||
using HopFrame.Testing;
|
||||
using Microsoft.FluentUI.AspNetCore.Components;
|
||||
using HopFrame.Testing.Components;
|
||||
using HopFrame.Testing.Models;
|
||||
using HopFrame.Web;
|
||||
using HopFrame.Web.AuditLogging;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Message = HopFrame.Testing.Models.Message;
|
||||
|
||||
@@ -113,10 +115,15 @@ builder.Services.AddHopFrame(options => {
|
||||
.ForceRelation()
|
||||
.Format((u, _) => u.Username ?? string.Empty);
|
||||
});
|
||||
|
||||
options.AddAuditLogging(builder.Services, contextBuilder => {
|
||||
contextBuilder.UseInMemoryDatabase("audit-logging");
|
||||
});
|
||||
});
|
||||
|
||||
builder.Services.AddSingleton<MessageRepository>();
|
||||
builder.Services.AddSingleton<GuestRepository>();
|
||||
builder.Services.AddScoped<IHopFrameAuthHandler, AuthHandler>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user