public async Task <ResponseBase <bool> > CreateClaim(CreateUserClaimInput input) { var user = await _userManager.FindByIdAsync(input.UserId); var claim = new Claim(input.Type, input.Value); var result = await _userManager.AddClaimAsync(user, claim); return(new ResponseBase <bool>() { Result = result.Succeeded, Message = string.Join(",", result.Errors.Select(a => a.Description)) }); }
public async Task <ResponseBase <bool> > CreateClaim([FromBody] CreateUserClaimInput input) { var result = await _userService.CreateClaim(input); return(result); }