Skip to content

Commit

Permalink
Unsecuring GetImageAtOrAround & making Live View button pass through …
Browse files Browse the repository at this point in the history
…api-key if being used
  • Loading branch information
leighghunt committed Nov 7, 2024
1 parent 08b0f0f commit 8289773
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion timelapse.api/Api/ImageController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public ActionResult GetLatest([FromQuery] int deviceId){
}

[HttpGet("GetImageAtOrAround")]
[ThirdPartyApiKeyAuth]
// [ThirdPartyApiKeyAuth]
public ActionResult<Image> GetImageAtOrAround([FromQuery] int deviceId, DateTime timestamp, bool forwards){
// Fowards == true - get at or after timestamp
// Forwards == false - get at or before timestamp
Expand Down
2 changes: 1 addition & 1 deletion timelapse.api/Pages/Events/Detail.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div class="form-group">
<label asp-for="Device.Description" class="control-label">Device Description</label>
<input readonly asp-for="Device.Description" class="form-control" />
<a class="btn btn-secondary" href="/ImageView/@(Model.Device.Id)"><i class="fa fa-play"></i> Live View</a>
<a class="btn btn-secondary" href="/ImageView/@(Model.Device.Id)@(HttpContext.Request.QueryString)"><i class="fa fa-play"></i> Live View</a>

<span asp-validation-for="Device.Description" class="text-danger"></span>
</div>
Expand Down

0 comments on commit 8289773

Please sign in to comment.