diff options
| author | transtrike <transtrike@gmail.com> | 2020-12-17 19:12:17 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2020-12-17 19:12:17 +0200 |
| commit | f4515fc3ff5fc222a3bdd40c5d4113f9bd79106f (patch) | |
| tree | 47810f9bdfb603639dccae899b5577b9b17e6aea /src | |
| parent | fadb0fd1b7a13d1c6210e11f2db2add7c8fd45a9 (diff) | |
| download | DevHive-f4515fc3ff5fc222a3bdd40c5d4113f9bd79106f.tar DevHive-f4515fc3ff5fc222a3bdd40c5d4113f9bd79106f.tar.gz DevHive-f4515fc3ff5fc222a3bdd40c5d4113f9bd79106f.zip | |
Newtonsoft.Json added
Diffstat (limited to 'src')
| -rw-r--r-- | src/DevHive.Web/Startup.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/DevHive.Web/Startup.cs b/src/DevHive.Web/Startup.cs index e81d307..fac1b4a 100644 --- a/src/DevHive.Web/Startup.cs +++ b/src/DevHive.Web/Startup.cs @@ -6,6 +6,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting;
using DevHive.Web.Configurations.Extensions;
using AutoMapper;
+using Newtonsoft.Json;
namespace DevHive.Web
{
@@ -21,7 +22,11 @@ namespace DevHive.Web // This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
- services.AddControllers();
+ services.AddControllers()
+ .AddNewtonsoftJson(x =>
+ {
+ x.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
+ });
services.DatabaseConfiguration(Configuration);
services.SwaggerConfiguration();
|
