returning true on successfully sent message
This commit is contained in:
parent
e8b9fe0dc3
commit
d2548941fa
@ -243,7 +243,7 @@ namespace PortBlog.API.Controllers
|
|||||||
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
public async Task<ActionResult> SendMessage(int candidateId, [FromBody] MessageDto message)
|
public async Task<ActionResult<bool>> SendMessage(int candidateId, [FromBody] MessageDto message)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -260,7 +260,7 @@ namespace PortBlog.API.Controllers
|
|||||||
messageSendDto.CandidateName = candidateDto.DisplayName;
|
messageSendDto.CandidateName = candidateDto.DisplayName;
|
||||||
messageSendDto.CandidateId = candidateDto.CandidateId;
|
messageSendDto.CandidateId = candidateDto.CandidateId;
|
||||||
await _mailService.SendAsync(messageSendDto);
|
await _mailService.SendAsync(messageSendDto);
|
||||||
return NoContent();
|
return Ok(true);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user