From 585c5c8537eb21dfc9f16108548e63d9ced3d971 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Mon, 24 Oct 2022 12:29:23 +0800 Subject: feat: Before move to FastEndpoints --- code/api/src/Endpoints/V1/Entries/UpdateEntryRoute.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'code/api/src/Endpoints/V1/Entries/UpdateEntryRoute.cs') diff --git a/code/api/src/Endpoints/V1/Entries/UpdateEntryRoute.cs b/code/api/src/Endpoints/V1/Entries/UpdateEntryRoute.cs index ac233e0..09e3b9c 100644 --- a/code/api/src/Endpoints/V1/Entries/UpdateEntryRoute.cs +++ b/code/api/src/Endpoints/V1/Entries/UpdateEntryRoute.cs @@ -16,7 +16,7 @@ public class UpdateEntryRoute : RouteBaseSync.WithRequest Handle(TimeEntry.TimeEntryDto timeEntryTimeEntryDto) { var entry = _context.TimeEntries @@ -32,7 +32,7 @@ public class UpdateEntryRoute : RouteBaseSync.WithRequest c.UserId == LoggedInUser.Id) .SingleOrDefault(c => c.Id == timeEntryTimeEntryDto.Category.Id); if (category == default) { - return NotFound(new ErrorResult("Not found", $"Could not find category {timeEntryTimeEntryDto.Category.Name}")); + return NotFound(new KnownProblemModel("Not found", $"Could not find category {timeEntryTimeEntryDto.Category.Name}")); } entry.Start = timeEntryTimeEntryDto.Start.ToUniversalTime(); -- cgit v1.3