Skip to content

Commit 5991e79

Browse files
authored
Refactor service registrations in Program.cs
Removed duplicate service registrations for HttpContextAccessor and VoxenAudits.
1 parent 8bf3303 commit 5991e79

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/bundles/Voxen.Server/Program.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@
1010

1111
var builder = WebApplication.CreateBuilder(args);
1212

13+
builder.Services
14+
.AddHttpContextAccessor();
15+
1316
var jwtSettings = builder.Configuration.GetSection("Jwt");
1417
builder.Services
18+
.AddVoxenAudits()
1519
.AddVoxenApiServices()
1620
.AddVoxenAuthentication(jwtSettings)
1721
.AddVoxenChannels()
1822
.AddVoxenDb()
19-
.AddVoxenServerInfo()
20-
.AddVoxenAudits()
21-
.AddHttpContextAccessor();
23+
.AddVoxenServerInfo();
2224

2325
var app = builder.Build();
2426

0 commit comments

Comments
 (0)