public void Post([FromBody] string value) { UserWithPassword newUser = JsonConvert.DeserializeObject <UserWithPassword>(value); IUserWriter userWriter = new UserWriter(); userWriter.CreateUser(newUser); }
public void Post([FromBody] string value) { DeleteUserParam delUser = Newtonsoft.Json.JsonConvert.DeserializeObject <DeleteUserParam>(value); IUserWriter userWriter = new UserWriter(); userWriter.DeleteUser(delUser); }
public void Post([FromBody] string value) { ValidateRequest(); UserWithPassword newUserDetails = JsonConvert.DeserializeObject <UserWithPassword>(value); IUserWriter iWriter = new UserWriter(); if (Convert.ToInt32(this.HttpContext.Request.Headers["UserId"]) == newUserDetails.Id) { iWriter.UpdatePassword(newUserDetails); } }