public async Task <IActionResult> Delete(PersonDeleteGet Person) { var CurrentUser = await _userManager.GetUserAsync(User); if (await _claimCheck.CheckClaim(CurrentUser, "ApplicationRight", this.ControllerContext.RouteData.Values["controller"].ToString() + "\\" + this.ControllerContext.RouteData.Values["action"].ToString())) { Person.UserId = CurrentUser.Id; //var CheckString = await _PersonProvider.DeletePostCheck(Person); //if (CheckString.Length == 0) //{ _personProvider.DeletePost(CurrentUser.Id, Person.PersonId); return(Ok(Person)); //} return(BadRequest(new { IsSuccess = false, //Message = CheckString, })); } return(BadRequest(new { IsSuccess = false, Message = "No rights", })); }