diff options
Diffstat (limited to 'src/DevHive.Web')
| -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();
|
