aboutsummaryrefslogtreecommitdiffstats
path: root/code/api/src/Endpoints/V1/Entries/UpdateEntryRoute.cs
diff options
context:
space:
mode:
Diffstat (limited to 'code/api/src/Endpoints/V1/Entries/UpdateEntryRoute.cs')
-rw-r--r--code/api/src/Endpoints/V1/Entries/UpdateEntryRoute.cs4
1 files changed, 2 insertions, 2 deletions
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<TimeEntry.TimeEntryDto
[ApiVersion(ApiSpecV1.VERSION_STRING)]
[BasicAuthentication(AppConstants.TOKEN_ALLOW_UPDATE)]
[HttpPost("~/v{version:apiVersion}/entries/update")]
- [ProducesResponseType(404, Type = typeof(ErrorResult))]
+ [ProducesResponseType(404, Type = typeof(KnownProblemModel))]
[ProducesResponseType(200, Type = typeof(TimeEntry.TimeEntryDto))]
public override ActionResult<TimeEntry.TimeEntryDto> Handle(TimeEntry.TimeEntryDto timeEntryTimeEntryDto) {
var entry = _context.TimeEntries
@@ -32,7 +32,7 @@ public class UpdateEntryRoute : RouteBaseSync.WithRequest<TimeEntry.TimeEntryDto
.Where(c => 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();