Skip to content

Commit

Permalink
Support Comma In Project Name (Checkmarx#897)
Browse files Browse the repository at this point in the history
* use name in params instead names

* fix for UT
  • Loading branch information
miryamfoiferCX authored Sep 26, 2024
1 parent f20c040 commit 25d1809
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/services/projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func FindProject(

func GetProjectsCollectionByProjectName(projectName string, projectsWrapper wrappers.ProjectsWrapper) (*wrappers.ProjectsCollectionResponseModel, error) {
params := make(map[string]string)
params["names"] = projectName
params["name"] = projectName
resp, _, err := projectsWrapper.Get(params)

if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/wrappers/mock/projects-mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (p *ProjectsMockWrapper) Get(params map[string]string) (
}

var model *wrappers.ProjectsCollectionResponseModel
switch name := params["names"]; name {
switch name := params["name"]; name {
case "fake-kics-scanner-fail":
model = getProjectResponseModel(fmt.Sprintf("%s-id", name), name, filteredTotalCount)
case "fake-multiple-scanner-fails":
Expand Down

0 comments on commit 25d1809

Please sign in to comment.