@@ -385,7 +385,7 @@ func (s *Server) staticSnapshot(w http.ResponseWriter, r *http.Request) {
385385 var monitorHistorical []MonitorHistorical
386386 switch interval {
387387 case "raw" :
388- monitorHistorical , err = s .historicalReader .ReadRawHistorical (ctx , monitorId )
388+ monitorHistorical , err = s .historicalReader .ReadRawHistorical (ctx , monitor . UniqueID )
389389 if err != nil {
390390 w .Header ().Set ("Content-Type" , "application/json" )
391391 w .WriteHeader (http .StatusInternalServerError )
@@ -394,7 +394,7 @@ func (s *Server) staticSnapshot(w http.ResponseWriter, r *http.Request) {
394394 return
395395 }
396396 case "hourly" :
397- monitorHistorical , err = s .historicalReader .ReadHourlyHistorical (ctx , monitorId )
397+ monitorHistorical , err = s .historicalReader .ReadHourlyHistorical (ctx , monitor . UniqueID )
398398 if err != nil {
399399 w .Header ().Set ("Content-Type" , "application/json" )
400400 w .WriteHeader (http .StatusInternalServerError )
@@ -403,7 +403,7 @@ func (s *Server) staticSnapshot(w http.ResponseWriter, r *http.Request) {
403403 return
404404 }
405405 case "daily" :
406- monitorHistorical , err = s .historicalReader .ReadDailyHistorical (ctx , monitorId )
406+ monitorHistorical , err = s .historicalReader .ReadDailyHistorical (ctx , monitor . UniqueID )
407407 if err != nil {
408408 w .Header ().Set ("Content-Type" , "application/json" )
409409 w .WriteHeader (http .StatusInternalServerError )
0 commit comments