diff --git a/API/Controllers/BaseApiController.cs b/API/Controllers/BaseApiController.cs index b08265db8..bb3886ab8 100644 --- a/API/Controllers/BaseApiController.cs +++ b/API/Controllers/BaseApiController.cs @@ -6,8 +6,5 @@ namespace API.Controllers [Route("api/[controller]")] public class BaseApiController : ControllerBase { - public BaseApiController() - { - } } } \ No newline at end of file diff --git a/API/Middleware/ExceptionMiddleware.cs b/API/Middleware/ExceptionMiddleware.cs index a946baff9..5219bf138 100644 --- a/API/Middleware/ExceptionMiddleware.cs +++ b/API/Middleware/ExceptionMiddleware.cs @@ -36,7 +36,7 @@ namespace API.Middleware context.Response.StatusCode = (int) HttpStatusCode.InternalServerError; var response = _env.IsDevelopment() - ? new ApiException(context.Response.StatusCode, ex.Message, ex.StackTrace?.ToString()) + ? new ApiException(context.Response.StatusCode, ex.Message, ex.StackTrace) : new ApiException(context.Response.StatusCode, "Internal Server Error"); var options = new JsonSerializerOptions diff --git a/API/Program.cs b/API/Program.cs index 6901678f3..f3a23a6c1 100644 --- a/API/Program.cs +++ b/API/Program.cs @@ -1,11 +1,8 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.Threading.Tasks; using API.Data; using Microsoft.AspNetCore.Hosting; using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; diff --git a/API/Startup.cs b/API/Startup.cs index f05530565..b691a71a4 100644 --- a/API/Startup.cs +++ b/API/Startup.cs @@ -1,17 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using API.Extensions; using API.Middleware; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.HttpsPolicy; -using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; using Microsoft.OpenApi.Models; namespace API