From 25d18093c1a302b3441c48d2517e109dcf6f554c Mon Sep 17 00:00:00 2001 From: miryamfoiferCX Date: Thu, 26 Sep 2024 11:14:24 +0300 Subject: [PATCH] Support Comma In Project Name (#897) * use name in params instead names * fix for UT --- internal/services/projects.go | 2 +- internal/wrappers/mock/projects-mock.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/services/projects.go b/internal/services/projects.go index a755baf67..ea79e8cb4 100644 --- a/internal/services/projects.go +++ b/internal/services/projects.go @@ -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 { diff --git a/internal/wrappers/mock/projects-mock.go b/internal/wrappers/mock/projects-mock.go index 29e276572..f289399a6 100644 --- a/internal/wrappers/mock/projects-mock.go +++ b/internal/wrappers/mock/projects-mock.go @@ -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":