Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing #74. #75

Merged
merged 3 commits into from
Jul 16, 2021
Merged

Fixing #74. #75

merged 3 commits into from
Jul 16, 2021

Conversation

lleadbet
Copy link
Contributor

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Problem/Feature

Fixes #74; the append function was nesting the array as the data type comes in as an interface{} vs. the real []interface{}

Description of Changes:

Checklist

  • My code follows the Contribution Guide
  • I have self-reviewed the changes being requested
  • I have made comments on pieces of code that may be difficult to understand for other editors
  • I have updated the documentation (if applicable)

@zneix
Copy link
Contributor

zneix commented Jul 14, 2021

Just curious, why do we omit this in case of "schedule"?

@lleadbet
Copy link
Contributor Author

Just curious, why do we omit this in case of "schedule"?

Schedule APIs don't have the data in the data value, instead it's under a nested segments value. Because of this, they're not an array of interfaces, just a regular interface and it'll panic.

@zneix
Copy link
Contributor

zneix commented Jul 14, 2021

Just curious, why do we omit this in case of "schedule"?

Schedule APIs don't have the data in the data value, instead it's under a nested segments value. Because of this, they're not an array of interfaces, just a regular interface and it'll panic.

Right, I forgot that's the case. Thank you for quick response!

@lleadbet lleadbet requested review from a team, angpt and MonstersOnParade and removed request for a team July 14, 2021 22:35
@lleadbet lleadbet self-assigned this Jul 14, 2021
@lleadbet lleadbet linked an issue Jul 14, 2021 that may be closed by this pull request
@lleadbet lleadbet merged commit 6beac57 into main Jul 16, 2021
@lleadbet lleadbet deleted the bugfix/nested-arrays-#74 branch July 16, 2021 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nested arrays in API responses Schedule endpoints error
2 participants