mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 12:42:38 +00:00
fix(backend): correct webhook session URL to /sessions/{id}
Webhook notifications built /session/{tenantId}/{sessionId}, which is a
dead route (404). The web app route is /sessions/{sessionId} (plural,
single segment); tenant is resolved from the session, not the path.
Fixes broken "Open session" links in enrollment-started and
success/failure notifications.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -871,7 +871,7 @@ namespace AutopilotMonitor.Functions.Functions.Ingest
|
||||
|
||||
var providerType = (WebhookProviderType)providerTypeInt;
|
||||
var sessionUrl = updatedSession != null
|
||||
? $"https://portal.autopilotmonitor.com/session/{request.TenantId}/{request.SessionId}"
|
||||
? $"https://portal.autopilotmonitor.com/sessions/{request.SessionId}"
|
||||
: null;
|
||||
|
||||
// Enrollment completion/failure notification
|
||||
|
||||
+1
-1
@@ -251,7 +251,7 @@ namespace AutopilotMonitor.Functions.Functions.Sessions
|
||||
if (string.IsNullOrEmpty(webhookUrl) || providerTypeInt == 0)
|
||||
return;
|
||||
|
||||
var sessionUrl = $"https://portal.autopilotmonitor.com/session/{tenantId}/{sessionId}";
|
||||
var sessionUrl = $"https://portal.autopilotmonitor.com/sessions/{sessionId}";
|
||||
var alert = NotificationAlertBuilder.BuildEnrollmentStartedAlert(
|
||||
session.DeviceName,
|
||||
session.SerialNumber,
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ namespace AutopilotMonitor.Functions.Services
|
||||
|
||||
var providerType = (WebhookProviderType)providerTypeInt;
|
||||
var sessionUrl = updatedSession != null
|
||||
? $"https://portal.autopilotmonitor.com/session/{request.TenantId}/{request.SessionId}"
|
||||
? $"https://portal.autopilotmonitor.com/sessions/{request.SessionId}"
|
||||
: null;
|
||||
|
||||
if (statusTransitioned && (c.CompletionEvent != null || c.FailureEvent != null))
|
||||
|
||||
Reference in New Issue
Block a user