This commit is contained in:
2020-06-08 23:59:40 +00:00
parent 937e9c5907
commit f22f2a9cda
3 changed files with 10 additions and 6 deletions

View File

@@ -45,9 +45,14 @@ namespace rockfishCore.Controllers
[HttpPost("reply/{account}/{id}")]
public JsonResult Reply([FromRoute] string account, [FromRoute] uint id, [FromBody] dtoReplyMessageItem m)
public ActionResult Reply([FromRoute] string account, [FromRoute] uint id, [FromBody] dtoReplyMessageItem m)
{
if (string.IsNullOrWhiteSpace(m.composition))
if (!ModelState.IsValid)
{
return BadRequest();
}
if (m==null || string.IsNullOrWhiteSpace(m.composition))
{
return Json(new { msg = "MailController:Reply->There is no reply text", error = 1 });
}