[HttpGet("{productId:guid}/all")]
public async Task<IActionResult> GetLicensesOnProduct(Guid productId)
{
var licenses = await licenseService.GetLicensesOnProduct(productId);
var response = licenses.Select(license => new LicenseResponse(
license.Id,
license.Key,
license.Duration,
license.Note,
license.DurationUnit,
license.Role,
license.CreatedByInternalUserId,
license.UserId,
license.CreatedOnUtc,
license.RedeemedOnUtc,
license.ExpirationDate,
license.Type,
license.State));
return Ok(response);
}
[HttpGet("{productId:guid}/all")]
public async Task<IActionResult> GetLicensesOnProduct(Guid productId)
{
var licenses = await licenseService.GetLicensesOnProduct(productId);
var response = licenses.Select(license => new LicenseResponse(
license.Id,
license.Key,
license.Duration,
license.Note,
license.DurationUnit,
license.Role,
license.CreatedByInternalUserId,
license.UserId,
license.CreatedOnUtc,
license.RedeemedOnUtc,
license.ExpirationDate,
license.Type,
license.State));
return Ok(response);
}