diff options
author | 杨宇千 <crupest@outlook.com> | 2019-08-04 21:35:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-04 21:35:04 +0800 |
commit | 52f5d2724d74ddb37141d8dfcc8384c0c8ce0e24 (patch) | |
tree | d1c9c7b51353b67b47bb4cd89aa82754ef0a1234 /Timeline/Startup.cs | |
parent | c07297373df08bd605f5bec96020192bb6dec151 (diff) | |
parent | d1ebb882e8484c80eca86cac80602fb4c1401834 (diff) | |
download | timeline-52f5d2724d74ddb37141d8dfcc8384c0c8ce0e24.tar.gz timeline-52f5d2724d74ddb37141d8dfcc8384c0c8ce0e24.tar.bz2 timeline-52f5d2724d74ddb37141d8dfcc8384c0c8ce0e24.zip |
Merge pull request #34 from crupest/token-time
Set token expired time and write unit tests.
Diffstat (limited to 'Timeline/Startup.cs')
-rw-r--r-- | Timeline/Startup.cs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Timeline/Startup.cs b/Timeline/Startup.cs index a6965190..242e816d 100644 --- a/Timeline/Startup.cs +++ b/Timeline/Startup.cs @@ -51,6 +51,7 @@ namespace Timeline services.AddScoped<IUserService, UserService>(); services.AddScoped<IJwtService, JwtService>(); services.AddTransient<IPasswordService, PasswordService>(); + services.AddTransient<IClock, Clock>(); var databaseConfig = Configuration.GetSection(nameof(DatabaseConfig)).Get<DatabaseConfig>(); @@ -83,12 +84,7 @@ namespace Timeline app.UseAuthentication(); - app.UseMvc(routes => - { - routes.MapRoute( - name: "default", - template: "{controller}/{action=Index}/{id?}"); - }); + app.UseMvcWithDefaultRoute(); } } } |