Skip to content

Commit abaae06

Browse files
author
cx-Margarita-LevitM
committed
Fix
1 parent 6776113 commit abaae06

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

internal/wrappers/codebashing-http.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ package wrappers
33
import (
44
"encoding/json"
55
"fmt"
6-
"github.com/checkmarx/ast-cli/internal/logger"
7-
"github.com/checkmarx/ast-cli/internal/wrappers/configuration"
86
"io"
97
"net/http"
108
"strings"
119

12-
commonParams "github.com/checkmarx/ast-cli/internal/params"
13-
"github.com/checkmarx/ast-cli/internal/wrappers/utils"
1410
"github.com/golang-jwt/jwt/v5"
1511
"github.com/pkg/errors"
1612
"github.com/spf13/viper"
13+
14+
"github.com/checkmarx/ast-cli/internal/logger"
15+
commonParams "github.com/checkmarx/ast-cli/internal/params"
16+
"github.com/checkmarx/ast-cli/internal/wrappers/configuration"
17+
"github.com/checkmarx/ast-cli/internal/wrappers/utils"
1718
)
1819

1920
const (
@@ -36,7 +37,7 @@ func NewCodeBashingHTTPWrapper(path string) *CodeBashingHTTPWrapper {
3637
}
3738
}
3839

39-
func (r *CodeBashingHTTPWrapper) GetCodeBashingLinks(queryID string, codeBashingURL string) (
40+
func (r *CodeBashingHTTPWrapper) GetCodeBashingLinks(queryID, codeBashingURL string) (
4041
*[]CodeBashingCollection,
4142
*WebError,
4243
error,

internal/wrappers/mock/codebashing-mock.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
package mock
22

33
import (
4+
commonParams "github.com/checkmarx/ast-cli/internal/params"
45
"github.com/checkmarx/ast-cli/internal/wrappers"
56
)
67

78
type CodeBashingMockWrapper struct{}
89

9-
func (r CodeBashingMockWrapper) GetCodeBashingLinks(queryID string, codeBashingURL string) (*[]wrappers.CodeBashingCollection, *wrappers.WebError, error) {
10+
func (r CodeBashingMockWrapper) GetCodeBashingLinks(queryID, codeBashingURL string) (*[]wrappers.CodeBashingCollection, *wrappers.WebError, error) {
1011
if queryID == "" {
1112
return nil, &wrappers.WebError{Message: "Cannot GET /lessons/mapping/"}, nil
1213
}
14+
codeBashingURL = commonParams.CodeBashingPathEnv
1315

1416
if queryID == "11666704984804998184" {
1517
collection := &wrappers.CodeBashingCollection{

0 commit comments

Comments
 (0)