Fix API service injection

This commit is contained in:
Ske
2019-08-12 06:54:28 +02:00
parent 1604500f2a
commit 5f79aaf960
3 changed files with 15 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Builder;
using App.Metrics;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
@@ -28,6 +29,8 @@ namespace PluralKit.API
.AddTransient<MemberStore>()
.AddTransient<SwitchStore>()
.AddTransient<MessageStore>()
.AddSingleton(svc => InitUtils.InitMetrics(svc.GetRequiredService<CoreConfig>(), "API"))
.AddScoped<TokenAuthService>()