diff options
author | crupest <crupest@outlook.com> | 2020-01-29 18:38:41 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-01-29 18:38:41 +0800 |
commit | 401a0c86054711bf5ebdce7d7717c9b59bffc2fa (patch) | |
tree | dd1cd091ecc2c80943735af4b71b53ef26fc7eee /Timeline/Startup.cs | |
parent | b6043126fae039c58512f60a576b10925b06df4c (diff) | |
download | timeline-401a0c86054711bf5ebdce7d7717c9b59bffc2fa.tar.gz timeline-401a0c86054711bf5ebdce7d7717c9b59bffc2fa.tar.bz2 timeline-401a0c86054711bf5ebdce7d7717c9b59bffc2fa.zip |
...
Diffstat (limited to 'Timeline/Startup.cs')
-rw-r--r-- | Timeline/Startup.cs | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/Timeline/Startup.cs b/Timeline/Startup.cs index 379ce6ea..091a16e5 100644 --- a/Timeline/Startup.cs +++ b/Timeline/Startup.cs @@ -1,14 +1,11 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpOverrides;
-using Microsoft.AspNetCore.Localization;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System;
-using System.Collections.Generic;
-using System.Globalization;
using System.Text.Json.Serialization;
using Timeline.Auth;
using Timeline.Configs;
@@ -89,7 +86,6 @@ namespace Timeline services.AddTransient<IPasswordService, PasswordService>();
services.AddTransient<IClock, Clock>();
services.AddUserAvatarService();
- services.AddScoped<IUserDetailService, UserDetailService>();
services.AddScoped<IPersonalTimelineService, PersonalTimelineService>();
@@ -113,8 +109,6 @@ namespace Timeline options.UseMySql(databaseConfig.ConnectionString);
});
}
-
- services.AddMemoryCache();
}
@@ -128,19 +122,6 @@ namespace Timeline app.UseRouting();
- var supportedCultures = new List<CultureInfo>
- {
- new CultureInfo("en"),
- new CultureInfo("zh")
- };
-
- app.UseRequestLocalization(new RequestLocalizationOptions
- {
- DefaultRequestCulture = new RequestCulture("en"),
- SupportedCultures = supportedCultures,
- SupportedUICultures = supportedCultures
- });
-
app.UseCors();
app.UseAuthentication();
|