From 5d3997b7e15b7bdaf5061bf900490bcfa235d0df Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 12 Aug 2026 12:43:31 +0200 Subject: [PATCH] Remove MarkAsSeen endpoint from EmailController The `MarkAsSeen` method in the `EmailController` class has been removed. This method provided an HTTP PATCH endpoint at the route `"seen"` to mark a single IMAP message as seen (read). It accepted a `MarkEmailAsSeenCommand` and a `CancellationToken`, used `mediator.Send` to process the command, and returned an HTTP 204 No Content response upon success. The removal of this method eliminates the ability to mark emails as seen via this endpoint. --- .../Controllers/EmailController.cs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/presentation/DigitalData.MessagingService.API/Controllers/EmailController.cs b/src/presentation/DigitalData.MessagingService.API/Controllers/EmailController.cs index 720949c..97913db 100644 --- a/src/presentation/DigitalData.MessagingService.API/Controllers/EmailController.cs +++ b/src/presentation/DigitalData.MessagingService.API/Controllers/EmailController.cs @@ -113,21 +113,5 @@ public class EmailController(IMediator mediator) : ControllerBase else return Ok(emails); } - - /// - /// Mark a single IMAP message as seen (read). - /// - /// The command containing the mailbox account identifier and the unique identifier (UID) of the message to mark as seen. - /// Cancellation token. - /// HTTP 204 No Content. - [HttpPatch("seen")] - [ProducesResponseType(StatusCodes.Status204NoContent)] - [ProducesResponseType(StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status404NotFound)] - public async Task MarkAsSeen([FromRoute] MarkEmailAsSeenCommand command, CancellationToken cancellationToken = default) - { - await mediator.Send(command, cancellationToken); - return NoContent(); - } #endregion Receive }