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.
This commit is contained in:
@@ -113,21 +113,5 @@ public class EmailController(IMediator mediator) : ControllerBase
|
|||||||
else
|
else
|
||||||
return Ok(emails);
|
return Ok(emails);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Mark a single IMAP message as seen (read).
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="command">The command containing the mailbox account identifier and the unique identifier (UID) of the message to mark as seen.</param>
|
|
||||||
/// <param name="cancellationToken">Cancellation token.</param>
|
|
||||||
/// <returns>HTTP 204 No Content.</returns>
|
|
||||||
[HttpPatch("seen")]
|
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
|
||||||
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
|
||||||
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
|
||||||
public async Task<IActionResult> MarkAsSeen([FromRoute] MarkEmailAsSeenCommand command, CancellationToken cancellationToken = default)
|
|
||||||
{
|
|
||||||
await mediator.Send(command, cancellationToken);
|
|
||||||
return NoContent();
|
|
||||||
}
|
|
||||||
#endregion Receive
|
#endregion Receive
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user