Skip to content

Commit

Permalink
fix(board): should return array instead of null (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainDreidemy authored Sep 13, 2023
1 parent fc8798c commit 568e1a7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/src/services/factories/service_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func BuildServiceResponse(service models.Service) models.ServiceResponseItem {
}

func BuildServiceResponses(services []models.Service) []models.ServiceResponseItem {
var serializedServices []models.ServiceResponseItem
serializedServices := make([]models.ServiceResponseItem, 0)
for i := 0; i < len(services); i++ {
serializedServices = append(serializedServices, BuildServiceResponse(services[i]))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func BuildServiceManagedVolumeLinkResponse(link models.ServiceManagedVolumeLink)
}

func BuildServiceManagedVolumeLinkResponses(links []models.ServiceManagedVolumeLink) []models.ServiceManagedVolumeLinkResponse {
var linkResponses []models.ServiceManagedVolumeLinkResponse
linkResponses := make([]models.ServiceManagedVolumeLinkResponse, 0)

for _, link := range links {
linkResponses = append(linkResponses, BuildServiceManagedVolumeLinkResponse(link))
Expand Down
2 changes: 1 addition & 1 deletion api/src/services/factories/service_network_link_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func BuildServiceNetworkLinkResponse(link models.ServiceNetworkLink) models.Serv
}

func BuildServiceNetworkLinkResponses(links []models.ServiceNetworkLink) []models.ServiceNetworkLinkResponse {
var linkResponses []models.ServiceNetworkLinkResponse
linkResponses := make([]models.ServiceNetworkLinkResponse, 0)

for _, link := range links {
linkResponses = append(linkResponses, BuildServiceNetworkLinkResponse(link))
Expand Down

0 comments on commit 568e1a7

Please sign in to comment.