summaryrefslogtreecommitdiff
path: root/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Program.cs')
-rw-r--r--Program.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Program.cs b/Program.cs
index 793aa1e..3df7c40 100644
--- a/Program.cs
+++ b/Program.cs
@@ -9,6 +9,7 @@ using System.Text;
using Microsoft.EntityFrameworkCore;
using BackendPIA;
using BackendPIA.Models;
+using BackendPIA.Jobs;
using BackendPIA.Policies;
using BackendPIA.Services;
@@ -26,6 +27,9 @@ builder.Services.AddIdentity<UserAccount, IdentityRole>().AddEntityFrameworkStor
// Automapper configuration.
builder.Services.AddAutoMapper(typeof(Program));
+// Hosted services.
+builder.Services.AddHostedService<LoggerJob>();
+
// Custom services configuration.
builder.Services.AddSingleton<ITokenGenerator>(s => new TokenGenerator(builder.Configuration["Jwt:Key"]));
builder.Services.AddScoped<IGameService, GameService>();