Skip to content

Commit

Permalink
Merge pull request #802 from hargata/Hargata/697
Browse files Browse the repository at this point in the history
Document the Calendar API along with support for auth.
  • Loading branch information
hargata authored Jan 11, 2025
2 parents 9fe7558 + 15ec9bb commit ad0f7de
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions Middleware/Authen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ protected override Task HandleChallengeAsync(AuthenticationProperties properties
if (value.ToString().ToLower() == "api")
{
Response.StatusCode = 401;
Response.Headers.Append("WWW-Authenticate", "Basic");
return Task.CompletedTask;
}
}
Expand Down
14 changes: 14 additions & 0 deletions Views/API/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,20 @@
vehicleId - Id of Vehicle
</div>
</div>
<div class="row api-method">
<div class="col-1">
<span class="badge bg-success">GET</span>
</div>
<div class="col-5 copyable">
<code>/api/calendar</code>
</div>
<div class="col-3">
Returns reminder calendar in ICS format
</div>
<div class="col-3">
No Params
</div>
</div>
<div class="row api-method">
<div class="col-1">
<span class="badge bg-primary">POST</span>
Expand Down

0 comments on commit ad0f7de

Please sign in to comment.