diff --git a/Controllers/APIController.cs b/Controllers/APIController.cs index c909472..02dd32c 100644 --- a/Controllers/APIController.cs +++ b/Controllers/APIController.cs @@ -1232,6 +1232,11 @@ namespace CarCareTracker.Controllers [Route("/api/vehicle/reminders/send")] public IActionResult SendReminders(List urgencies) { + if (!urgencies.Any()) + { + //if no urgencies parameter, we will default to all urgencies. + urgencies = new List { ReminderUrgency.NotUrgent, ReminderUrgency.Urgent, ReminderUrgency.VeryUrgent, ReminderUrgency.PastDue }; + } var vehicles = _dataAccess.GetVehicles(); List operationResponses = new List(); var defaultEmailAddress = _config.GetUserConfig(User).DefaultReminderEmail; diff --git a/Views/API/Index.cshtml b/Views/API/Index.cshtml index 1e9a72f..99d3126 100644 --- a/Views/API/Index.cshtml +++ b/Views/API/Index.cshtml @@ -614,7 +614,7 @@
GET
-
+
/api/vehicle/reminders/send
@@ -622,7 +622,7 @@
(must be root user)
- urgencies[]=[NotUrgent,Urgent,VeryUrgent,PastDue] + urgencies[]=[NotUrgent,Urgent,VeryUrgent,PastDue](optional)
@@ -651,7 +651,7 @@
(must be root user)
- deepClean(bool) - Perform deep clean + deepClean(bool) - Perform deep clean(optional)
} @@ -660,11 +660,7 @@ if (e.ctrlKey || e.metaKey){ let targetElement = $(e.currentTarget); if (targetElement.hasClass("testable")){ - if (targetElement.attr("data-testparam")){ - window.location = `${targetElement.text().trim()}${targetElement.attr("data-testparam")}`; - } else { - window.location = targetElement.text().trim(); - } + window.location = targetElement.text().trim(); } } else { copyToClipboard(e.currentTarget);