This commit is contained in:
@@ -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 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user