From 79ab2b304d93b1029515bd3f954db4e5a73f4168 Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 30 Jan 2020 20:26:52 +0800 Subject: ... --- Timeline/Startup.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'Timeline/Startup.cs') diff --git a/Timeline/Startup.cs b/Timeline/Startup.cs index 091a16e5..998b5c44 100644 --- a/Timeline/Startup.cs +++ b/Timeline/Startup.cs @@ -1,3 +1,4 @@ +using AutoMapper; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.HttpOverrides; @@ -47,7 +48,6 @@ namespace Timeline }); services.Configure(Configuration.GetSection(nameof(JwtConfig))); - var jwtConfig = Configuration.GetSection(nameof(JwtConfig)).Get(); services.AddAuthentication(AuthenticationConstants.Scheme) .AddScheme(AuthenticationConstants.Scheme, AuthenticationConstants.DisplayName, o => { }); services.AddAuthorization(); @@ -75,16 +75,14 @@ namespace Timeline }); } - services.AddLocalization(options => - { - options.ResourcesPath = "Resources"; - }); + services.AddAutoMapper(GetType().Assembly); + + services.AddTransient(); + services.AddTransient(); services.AddScoped(); services.AddScoped(); services.AddScoped(); - services.AddTransient(); - services.AddTransient(); services.AddUserAvatarService(); services.AddScoped(); -- cgit v1.2.3