diff --git a/pkg/server/handler/resource/handler.go b/pkg/server/handler/resource/handler.go index b3e2df7d5..4941dbe55 100644 --- a/pkg/server/handler/resource/handler.go +++ b/pkg/server/handler/resource/handler.go @@ -93,7 +93,7 @@ func (h *Handler) GetResource() http.HandlerFunc { // @Description Get resource graph by stack ID // @Tags resource // @Produce json -// @Param stack_id query uint true "Stack ID" +// @Param stackID query uint true "Stack ID" // @Success 200 {object} handler.Response{data=entity.ResourceGraph} "Success" // @Failure 400 {object} error "Bad Request" // @Failure 401 {object} error "Unauthorized" diff --git a/pkg/server/handler/stack/handler.go b/pkg/server/handler/stack/handler.go index 432437c2a..7c817c0da 100644 --- a/pkg/server/handler/stack/handler.go +++ b/pkg/server/handler/stack/handler.go @@ -169,8 +169,7 @@ func (h *Handler) GetStack() http.HandlerFunc { // @Param projectID query uint false "ProjectID to filter stacks by. Default to all" // @Param orgID query uint false "OrgID to filter stacks by. Default to all" // @Param projectName query string false "ProjectName to filter stacks by. Default to all" -// @Param cloud query string false "Cloud to filter stacks by. Default to all" -// @Param env query string false "Environment to filter stacks by. Default to all" +// @Param path query string false "Path to filter stacks by. Default to all" // @Param page query uint false "The current page to fetch. Default to 1" // @Param pageSize query uint false "The size of the page. Default to 10" // @Success 200 {object} handler.Response{data=response.PaginatedStackResponse} "Success" diff --git a/pkg/server/handler/stack/run.go b/pkg/server/handler/stack/run.go index e6bdcae49..93f765020 100644 --- a/pkg/server/handler/stack/run.go +++ b/pkg/server/handler/stack/run.go @@ -79,10 +79,6 @@ func (h *Handler) GetRunResult() http.HandlerFunc { // @Tags stack // @Produce json // @Param projectID query uint false "ProjectID to filter runs by. Default to all" -// @Param orgID query uint false "OrgID to filter runs by. Default to all" -// @Param projectName query string false "ProjectName to filter runs by. Default to all" -// @Param cloud query string false "Cloud to filter runs by. Default to all" -// @Param env query string false "Environment to filter runs by. Default to all" // @Param type query []string false "RunType to filter runs by. Default to all" // @Param status query []string false "RunStatus to filter runs by. Default to all" // @Param stackID query uint false "StackID to filter runs by. Default to all" diff --git a/pkg/server/handler/workspace/handler.go b/pkg/server/handler/workspace/handler.go index 5399d2c27..b193a0a04 100644 --- a/pkg/server/handler/workspace/handler.go +++ b/pkg/server/handler/workspace/handler.go @@ -147,6 +147,7 @@ func (h *Handler) GetWorkspace() http.HandlerFunc { // @Description List all workspaces // @Tags workspace // @Produce json +// @Param backendID query uint false "BackendID to filter workspaces by. Default to all" // @Param page query uint false "The current page to fetch. Default to 1" // @Param pageSize query uint false "The size of the page. Default to 10" // @Success 200 {object} handler.Response{data=response.PaginatedWorkspaceResponse} "Success" diff --git a/pkg/server/manager/stack/util.go b/pkg/server/manager/stack/util.go index e6779d71a..60b5c2bba 100644 --- a/pkg/server/manager/stack/util.go +++ b/pkg/server/manager/stack/util.go @@ -251,7 +251,7 @@ func (m *StackManager) BuildStackFilter(ctx context.Context, query *url.Values) orgIDParam := query.Get("orgID") projectIDParam := query.Get("projectID") projectNameParam := query.Get("projectName") - envParam := query.Get("env") + pathParam := query.Get("path") if orgIDParam != "" { orgID, err := strconv.Atoi(orgIDParam) @@ -274,8 +274,8 @@ func (m *StackManager) BuildStackFilter(ctx context.Context, query *url.Values) return nil, err } filter.ProjectID = projectEntity.ID - if envParam != "" { - filter.Path = fmt.Sprintf("%s/%s", projectEntity.Path, envParam) + if pathParam != "" { + filter.Path = pathParam logger.Info("Showing path filter without cloud", "filter.Path: ", filter.Path) } }