Skip to content

Commit

Permalink
fix empty data return issue in dal multiple pair api
Browse files Browse the repository at this point in the history
  • Loading branch information
Intizar-T committed Jul 22, 2024
1 parent c0d45e5 commit 034bcdd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions node/pkg/dal/api/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ func getLatestFeeds(c *fiber.Ctx) error {
}

symbols := strings.Split(symbolsStr, ",")
results := make([]*dalcommon.OutgoingSubmissionData, len(symbols))
for i, symbol := range symbols {
results := []*dalcommon.OutgoingSubmissionData{}
for _, symbol := range symbols {
if symbol == "" {
continue
}
Expand All @@ -219,7 +219,7 @@ func getLatestFeeds(c *fiber.Ctx) error {
return err
}

results[i] = result
results = append(results, result)
}

return c.JSON(results)
Expand Down

0 comments on commit 034bcdd

Please sign in to comment.