Private
Public Access
1
0

Fix lint warnings
All checks were successful
continuous-integration/drone/tag Build is passing

This commit is contained in:
2024-03-09 09:03:41 -08:00
parent 3cbef93607
commit e01d6e6895

View File

@@ -95,7 +95,6 @@ func (srv *Server) getHistoryParameters(ctx context.Context, c echo.Context) (hi
return p, echo.NewHTTPError(http.StatusNotFound, "monitor not found") return p, echo.NewHTTPError(http.StatusNotFound, "monitor not found")
} }
if err != nil {
monitorParam = monitorParam + ".%" monitorParam = monitorParam + ".%"
monitor, err := q.GetMonitorByName(ctx, sql.NullString{Valid: true, String: monitorParam}) monitor, err := q.GetMonitorByName(ctx, sql.NullString{Valid: true, String: monitorParam})
if err != nil { if err != nil {
@@ -103,7 +102,7 @@ func (srv *Server) getHistoryParameters(ctx context.Context, c echo.Context) (hi
return p, echo.NewHTTPError(http.StatusNotFound, "monitor not found") return p, echo.NewHTTPError(http.StatusNotFound, "monitor not found")
} }
monitorID = monitor.ID monitorID = monitor.ID
}
} }
} }
@@ -133,7 +132,7 @@ func (srv *Server) getHistoryParameters(ctx context.Context, c echo.Context) (hi
return p, nil return p, nil
} }
func (srv *Server) getHistoryMySQL(ctx context.Context, c echo.Context, p historyParameters) (*logscores.LogScoreHistory, error) { func (srv *Server) getHistoryMySQL(ctx context.Context, _ echo.Context, p historyParameters) (*logscores.LogScoreHistory, error) {
ls, err := logscores.GetHistoryMySQL(ctx, srv.db, p.server.ID, uint32(p.monitorID), p.since, p.limit) ls, err := logscores.GetHistoryMySQL(ctx, srv.db, p.server.ID, uint32(p.monitorID), p.since, p.limit)
return ls, err return ls, err
} }