Skip to content

Commit ac06483

Browse files
committed
Add new license url for MassTransit
1 parent f973092 commit ac06483

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ServiceControl/Licensing/LicenseController.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
using System.Threading;
44
using System.Threading.Tasks;
55
using Microsoft.AspNetCore.Mvc;
6+
using Monitoring.HeartbeatMonitoring;
67
using Particular.ServiceControl.Licensing;
78
using ServiceBus.Management.Infrastructure.Settings;
89

910
[ApiController]
1011
[Route("api")]
11-
public class LicenseController(ActiveLicense activeLicense, Settings settings) : ControllerBase
12+
public class LicenseController(ActiveLicense activeLicense, Settings settings, MassTransitConnectorHeartbeatStatus connectorHeartbeatStatus) : ControllerBase
1213
{
1314
[HttpGet]
1415
[Route("license")]
@@ -30,7 +31,9 @@ public async Task<ActionResult<LicenseInfo>> License(bool refresh, string client
3031
LicenseType = activeLicense.Details.LicenseType ?? string.Empty,
3132
InstanceName = settings.InstanceName ?? string.Empty,
3233
LicenseStatus = activeLicense.Details.Status,
33-
LicenseExtensionUrl = $"https://particular.net/extend-your-trial?p={clientName}"
34+
LicenseExtensionUrl = connectorHeartbeatStatus.LastHeartbeat == null
35+
? $"https://particular.net/extend-your-trial?p={clientName}"
36+
: $"https://particular.net/extend-your-connector-trial?p={clientName}"
3437
};
3538

3639
return licenseInfo;

0 commit comments

Comments
 (0)