public async Task <IActionResult> RemoveUser([FromQuery] string userId) { var companyId = this.User.Claims.SingleOrDefault(c => c.Type == "companyId").Value; var user = await usersProvider.GetPerson(userId); if (user == null) { return(NotFound("User not found")); } await usersProvider.RemoveUser(user); return(Ok(userId)); }
Task <bool> IUsersService.RemoveUserAsync(IUser user) { return(Task.Run(() => _usersProvider.RemoveUser(user.Id))); }