| | | 1 | | using Microsoft.AspNetCore.Http; |
| | | 2 | | using Microsoft.AspNetCore.Mvc; |
| | | 3 | | using Microsoft.AspNetCore.Mvc.ModelBinding; |
| | | 4 | | using SVETA.Api.Data.DTO; |
| | | 5 | | using System; |
| | | 6 | | using System.Collections.Generic; |
| | | 7 | | using System.Linq; |
| | | 8 | | using System.Threading.Tasks; |
| | | 9 | | |
| | | 10 | | namespace SVETA.Api.Controllers |
| | | 11 | | { |
| | | 12 | | public class ValidationFailedResult : ObjectResult |
| | | 13 | | { |
| | | 14 | | public ValidationFailedResult(ModelStateDictionary modelState) |
| | 0 | 15 | | : base(new ErrorDTO(modelState)) |
| | 0 | 16 | | { |
| | 0 | 17 | | StatusCode = StatusCodes.Status400BadRequest; |
| | 0 | 18 | | } |
| | | 19 | | } |
| | | 20 | | } |