From 15ec9bb454f0819b4e574ad37eb4dc073dc7fd2e Mon Sep 17 00:00:00 2001 From: "DESKTOP-T0O5CDB\\DESK-555BD" Date: Fri, 10 Jan 2025 19:43:09 -0700 Subject: [PATCH] Document the Calendar API along with support for auth. --- Middleware/Authen.cs | 1 + Views/API/Index.cshtml | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/Middleware/Authen.cs b/Middleware/Authen.cs index e2d8758..aca0d0b 100644 --- a/Middleware/Authen.cs +++ b/Middleware/Authen.cs @@ -154,6 +154,7 @@ namespace CarCareTracker.Middleware if (value.ToString().ToLower() == "api") { Response.StatusCode = 401; + Response.Headers.Append("WWW-Authenticate", "Basic"); return Task.CompletedTask; } } diff --git a/Views/API/Index.cshtml b/Views/API/Index.cshtml index f817f1e..3f2d369 100644 --- a/Views/API/Index.cshtml +++ b/Views/API/Index.cshtml @@ -578,6 +578,20 @@ vehicleId - Id of Vehicle +
+
+ GET +
+
+ /api/calendar +
+
+ Returns reminder calendar in ICS format +
+
+ No Params +
+
POST