chore(backend): silence some more resharper errors

This commit is contained in:
sam 2024-09-14 16:37:52 +02:00
parent 103ba24555
commit 2cef7523d2
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
14 changed files with 38 additions and 35 deletions

View file

@ -1,6 +1,4 @@
using System.Collections.ObjectModel;
using System.Net;
using Foxnouns.Backend.Middleware;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
@ -51,7 +49,7 @@ public class ApiError(string message, HttpStatusCode? statusCode = null, ErrorCo
{
{ "status", (int)HttpStatusCode.BadRequest },
{ "message", Message },
{ "code", ErrorCode.BadRequest.ToString() }
{ "code", "BAD_REQUEST" }
};
if (errors == null) return o;
@ -84,7 +82,7 @@ public class ApiError(string message, HttpStatusCode? statusCode = null, ErrorCo
{
{ "status", (int)HttpStatusCode.BadRequest },
{ "message", Message },
{ "code", ErrorCode.BadRequest.ToString() }
{ "code", "BAD_REQUEST" }
};
if (modelState == null) return o;