public IActionResult AddMessage(MessageRequest request) { if (ModelState.IsValid) { Response response = new Response(); _xbService.AddMessage(request.Message); response.ResultCode = ResultCodes.normal; return(ResponseExtensions.ToHttpResponse(response)); } else { return(ValidationError.GetValidationErrorResponse(ModelState)); } }