diff --git a/cmd/api/src/api/middleware/compression.go b/cmd/api/src/api/middleware/compression.go index 19a3479ae7..d239587cbf 100644 --- a/cmd/api/src/api/middleware/compression.go +++ b/cmd/api/src/api/middleware/compression.go @@ -30,7 +30,7 @@ import ( "github.com/specterops/bloodhound/src/api" ) -var unsupportedEncodingError = errors.New("content encoding is not supported") +var errUnsupportedEncoding = errors.New("content encoding is not supported") type GzipResponseWriter struct { http.ResponseWriter @@ -66,7 +66,7 @@ func CompressionMiddleware(next http.Handler) http.Handler { if err != nil { errMsg := fmt.Sprintf("failed to create reader for %s encoding: %v", encoding, err) log.Warnf(errMsg) - if errors.Is(err, unsupportedEncodingError) { + if errors.Is(err, errUnsupportedEncoding) { api.WriteErrorResponse(request.Context(), api.BuildErrorResponse(http.StatusUnsupportedMediaType, fmt.Sprintf("Error trying to read request: %s", errMsg), request), responseWriter) } else { api.WriteErrorResponse(request.Context(), api.BuildErrorResponse(http.StatusBadRequest, fmt.Sprintf("Error trying to read request: %s", errMsg), request), responseWriter) @@ -107,7 +107,7 @@ func wrapBody(encoding string, body io.ReadCloser) (io.ReadCloser, error) { newBody, err = zlib.NewReader(body) default: log.Infof("unsupported encoding detected: %s", encoding) - err = unsupportedEncodingError + err = errUnsupportedEncoding } return newBody, err } diff --git a/cmd/api/src/bootstrap/util.go b/cmd/api/src/bootstrap/util.go index 14fd4e6709..0e0e7c8835 100644 --- a/cmd/api/src/bootstrap/util.go +++ b/cmd/api/src/bootstrap/util.go @@ -19,16 +19,16 @@ package bootstrap import ( "context" "fmt" + "os" + "github.com/specterops/bloodhound/dawgs" "github.com/specterops/bloodhound/dawgs/drivers/neo4j" - _ "github.com/specterops/bloodhound/dawgs/drivers/neo4j" "github.com/specterops/bloodhound/dawgs/drivers/pg" "github.com/specterops/bloodhound/dawgs/graph" "github.com/specterops/bloodhound/dawgs/util/size" "github.com/specterops/bloodhound/log" "github.com/specterops/bloodhound/src/api/tools" "github.com/specterops/bloodhound/src/config" - "os" ) func ensureDirectory(path string) error { diff --git a/cmd/ui/src/views/Home/Home.tsx b/cmd/ui/src/views/Home/Home.tsx index acb3623414..5657d0527e 100644 --- a/cmd/ui/src/views/Home/Home.tsx +++ b/cmd/ui/src/views/Home/Home.tsx @@ -22,7 +22,3 @@ const Home: React.FC = () => { }; export default Home; - -// TODO: Remove before merge to fix linter messages -const arr = [].reduce(function(prev: never, curr: never, idx: number, arr: never[]) {}) -