Skip to content

Commit b37a997

Browse files
authored
Merge branch 'master' into test/backend/more-tests
2 parents c0b7202 + b9c9f31 commit b37a997

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

backend/http.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ func (s *Server) StaticSnapshot(w http.ResponseWriter, r *http.Request) {
390390
var monitorHistorical []MonitorHistorical
391391
switch interval {
392392
case "raw":
393-
monitorHistorical, err = s.HistoricalReader.ReadRawHistorical(ctx, monitorId)
393+
monitorHistorical, err = s.HistoricalReader.ReadRawHistorical(ctx, monitor.UniqueID)
394394
if err != nil {
395395
w.Header().Set("Content-Type", "application/json")
396396
w.WriteHeader(http.StatusInternalServerError)
@@ -399,7 +399,7 @@ func (s *Server) StaticSnapshot(w http.ResponseWriter, r *http.Request) {
399399
return
400400
}
401401
case "hourly":
402-
monitorHistorical, err = s.HistoricalReader.ReadHourlyHistorical(ctx, monitorId)
402+
monitorHistorical, err = s.HistoricalReader.ReadHourlyHistorical(ctx, monitor.UniqueID)
403403
if err != nil {
404404
w.Header().Set("Content-Type", "application/json")
405405
w.WriteHeader(http.StatusInternalServerError)
@@ -408,7 +408,7 @@ func (s *Server) StaticSnapshot(w http.ResponseWriter, r *http.Request) {
408408
return
409409
}
410410
case "daily":
411-
monitorHistorical, err = s.HistoricalReader.ReadDailyHistorical(ctx, monitorId)
411+
monitorHistorical, err = s.HistoricalReader.ReadDailyHistorical(ctx, monitor.UniqueID)
412412
if err != nil {
413413
w.Header().Set("Content-Type", "application/json")
414414
w.WriteHeader(http.StatusInternalServerError)

0 commit comments

Comments
 (0)