Exemplo n.º 1
0
        public HttpResponseMessage Create(ResetCreateRequest req)
        {
            if (req == null)
            {
                ModelState.AddModelError("", "You did not add any body data");
            }
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }
            Guid token = passwordResetService.Create(req);
            ItemResponse <Guid> itemResponse = new ItemResponse <Guid>();

            itemResponse.Item = token;

            return(Request.CreateResponse(HttpStatusCode.OK, itemResponse));
        }