Example #1
0
        public HttpResponseMessage Right(int id, [FromBody] RequestModel request)
        {
            var status = HttpStatusCode.BadRequest;

            if (request != null && !string.IsNullOrWhiteSpace(request.Data))
            {
                status = _diffService.Right(id, request.Data) ? HttpStatusCode.Created : HttpStatusCode.BadRequest;
            }

            return(Request.CreateResponse(status));
        }