Skip to content

Commit 01f4f4d

Browse files
fix: Fix return type of getAll for Ephemeral Environments (#374)
The return type is set to the general base environment type, however we know our query will return only ephemeral environments
1 parent 1459264 commit 01f4f4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/environments/v2/ephemeralenvironments/ephemeral_environment_service.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import (
99
"github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/resources"
1010
)
1111

12-
func GetAll(client newclient.Client, spaceID string) (*resources.Resources[*environments.Environment], error) {
12+
func GetAll(client newclient.Client, spaceID string) (*resources.Resources[*EphemeralEnvironment], error) {
1313
query := &environments.EnvironmentQuery{
1414
Skip: 0,
1515
Take: math.MaxInt32,
1616
Type: []string{"Ephemeral"},
1717
}
1818

19-
return newclient.GetByQuery[environments.Environment](client, v2.Template, spaceID, query)
19+
return newclient.GetByQuery[EphemeralEnvironment](client, v2.Template, spaceID, query)
2020
}
2121

2222
type CreateEnvironmentResponse struct {

0 commit comments

Comments
 (0)