Skip to content

Commit cd1a3f5

Browse files
author
cx-Margarita-LevitM
committed
Update from queryId to queryID
1 parent a20413e commit cd1a3f5

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

internal/commands/result.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,13 +1086,13 @@ func runGetCodeBashingCommand(
10861086
) func(cmd *cobra.Command, args []string) error {
10871087
return func(cmd *cobra.Command, args []string) error {
10881088

1089-
queryId, _ := cmd.Flags().GetString(commonParams.QueryIDFlag)
1089+
queryID, _ := cmd.Flags().GetString(commonParams.QueryIDFlag)
10901090
codeBashingURL, err := codeBashingWrapper.GetCodeBashingURL(codeBashingKey)
10911091
if err != nil {
10921092
return err
10931093
}
10941094
// Make the request to the api to obtain the codebashing link and send the codebashing url to enrich the path
1095-
CodeBashingModel, webError, err := codeBashingWrapper.GetCodeBashingLinks(queryId, codeBashingURL)
1095+
CodeBashingModel, webError, err := codeBashingWrapper.GetCodeBashingLinks(queryID, codeBashingURL)
10961096
if err != nil {
10971097
return err
10981098
}

internal/wrappers/codebashing-http.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ func NewCodeBashingHTTPWrapper(path string) *CodeBashingHTTPWrapper {
3636
}
3737
}
3838

39-
func (r *CodeBashingHTTPWrapper) GetCodeBashingLinks(queryId string, codeBashingURL string) (
39+
func (r *CodeBashingHTTPWrapper) GetCodeBashingLinks(queryID string, codeBashingURL string) (
4040
*[]CodeBashingCollection,
4141
*WebError,
4242
error,
4343
) {
4444
r.path = setCodeBashingDefaultPath(r.path)
4545
clientTimeout := viper.GetUint(commonParams.ClientTimeoutKey)
46-
resp, err := SendHTTPRequestNoBaseCBURL(http.MethodGet, r.path+"/"+queryId, http.NoBody, true, clientTimeout)
46+
resp, err := SendHTTPRequestNoBaseCBURL(http.MethodGet, r.path+"/"+queryID, http.NoBody, true, clientTimeout)
4747
if err != nil {
4848
return nil, nil, err
4949
}

internal/wrappers/codebashing-json.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type CodeBashingCollection struct {
1111
LessonDisplayName string `json:"lessonDisplayName,omitempty"`
1212
CourseDisplayName string `json:"courseDisplayName,omitempty"`
1313
Duration string `json:"duration,omitempty"`
14-
ImageUrl string `json:"imageUrl,omitempty"`
14+
ImageURL string `json:"imageUrl,omitempty"`
1515
TagsResult []CodeBashingTag `json:"tagsResult,omitempty"`
1616
Path string `json:"lessonUrl,omitempty"`
1717
PotentialPoints int `json:"potentialPoints,omitempty"`
@@ -23,5 +23,5 @@ type CodeBashingResponse struct {
2323
}
2424

2525
type CodeBashingParamsCollection struct {
26-
QueryId string `json:"queryId,omitempty"`
26+
QueryID string `json:"queryId,omitempty"`
2727
}

internal/wrappers/codebashing.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package wrappers
22

33
type CodeBashingWrapper interface {
4-
GetCodeBashingLinks(queryId string, codeBashingURL string) (*[]CodeBashingCollection, *WebError, error)
4+
GetCodeBashingLinks(queryID string, codeBashingURL string) (*[]CodeBashingCollection, *WebError, error)
55
GetCodeBashingURL(field string) (string, error)
66
BuildCodeBashingParams(CodeBashingParamsCollection) (map[string]string, error)
77
}

internal/wrappers/mock/codebashing-mock.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import (
66

77
type CodeBashingMockWrapper struct{}
88

9-
func (r CodeBashingMockWrapper) GetCodeBashingLinks(queryId string, codeBashingURL string) (*[]wrappers.CodeBashingCollection, *wrappers.WebError, error) {
10-
if queryId == "" {
9+
func (r CodeBashingMockWrapper) GetCodeBashingLinks(queryID string, codeBashingURL string) (*[]wrappers.CodeBashingCollection, *wrappers.WebError, error) {
10+
if queryID == "" {
1111
return nil, &wrappers.WebError{Message: "Cannot GET /lessons/mapping/"}, nil
1212
}
1313

14-
if queryId == "11666704984804998184" {
14+
if queryID == "11666704984804998184" {
1515
collection := &wrappers.CodeBashingCollection{
1616
Path: "/app/home",
1717
}

0 commit comments

Comments
 (0)