aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Startup.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-10-19 17:33:38 +0800
committer杨宇千 <crupest@outlook.com>2019-10-19 17:33:38 +0800
commita268999b8c975588c01b345829edfc0099af6f93 (patch)
treef75fde126094e8310dd9e2588bb9b9e8baa79a3b /Timeline/Startup.cs
parentfa2a3282c51d831b25f374803301e75eac15d11c (diff)
downloadtimeline-a268999b8c975588c01b345829edfc0099af6f93.tar.gz
timeline-a268999b8c975588c01b345829edfc0099af6f93.tar.bz2
timeline-a268999b8c975588c01b345829edfc0099af6f93.zip
...
Diffstat (limited to 'Timeline/Startup.cs')
-rw-r--r--Timeline/Startup.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Timeline/Startup.cs b/Timeline/Startup.cs
index 8e8a6393..fc570fdd 100644
--- a/Timeline/Startup.cs
+++ b/Timeline/Startup.cs
@@ -27,11 +27,12 @@ namespace Timeline
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
- services.AddMvc()
+ services.AddControllers()
.ConfigureApiBehaviorOptions(options =>
{
options.InvalidModelStateResponseFactory = InvalidModelResponseFactory.Factory;
- });
+ })
+ .AddNewtonsoftJson();
services.Configure<JwtConfig>(Configuration.GetSection(nameof(JwtConfig)));
var jwtConfig = Configuration.GetSection(nameof(JwtConfig)).Get<JwtConfig>();