Skip to content

Commit

Permalink
Merge pull request #1938 from posit-dev/dotnomad/slice-fix
Browse files Browse the repository at this point in the history
Fix empty array response for recursive resources
  • Loading branch information
sagerb committed Jul 9, 2024
2 parents 75d7ad5 + 9116891 commit 2f16ee0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/services/api/get_configurations.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func GetConfigurationsHandlerFunc(base util.AbsolutePath, log logging.Logger) ht
}
entrypoint := req.URL.Query().Get("entrypoint")

var response []configDTO
response := make([]configDTO, 0)
if req.URL.Query().Get("recursive") == "true" {
// Recursively search for .posit directories
walker, err := matcher.NewMatchingWalker([]string{"*"}, projectDir, log)
Expand Down
2 changes: 1 addition & 1 deletion internal/services/api/get_deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func GetDeploymentsHandlerFunc(base util.AbsolutePath, log logging.Logger) http.
// Response already returned by ProjectDirFromRequest
return
}
var response []any
response := make([]any, 0)
entrypoint := req.URL.Query().Get("entrypoint")

if req.URL.Query().Get("recursive") == "true" {
Expand Down

0 comments on commit 2f16ee0

Please sign in to comment.