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
Update /v2/sections/valid_scripts
dependencies
#22669
Conversation
@@ -115,7 +115,7 @@ def valid_scripts | |||
return head :forbidden unless current_user | |||
|
|||
scripts = Script.valid_scripts(current_user).map(&:assignable_info) | |||
render json: {scripts: scripts} | |||
render json: scripts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please double check that all of your integers in this json are coming back as integers and not strings. for some reason, I ran into a problem when rendering an array as json (like you have it here), rather than rendering an object (like it was before). past discussion for a bit of context: #22176 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exciting! LGTM after considering the json rendering issue. Presumably you won't be able to merge this until after the other PRs go in and the i18n sync happens on Monday.
This PR is part of the work to move the
/v2/sections/valid_scripts
endpoint to dashboard. See #22507 and #22655 for more context.What it does
teacherSectionsRedux
(including tests and storybook dependencies) to the new endpoint atdashboardapi/sections/valid_scripts
scripts
rather than nested{scripts: scripts}
JSON for more straightforward consumption on the frontendFollow-up Work
/v2/sections/valid_scripts
and log a notification to Honeybadger once all known dependencies have been removed