Repository navigation
fix(installer): default rpc routes to /rpc/run and /rpc/validate - #109
Closed
sfelixalejandro wants to merge 1 commit into
Closed
sfelixalejandro wants to merge 1 commit into
sfelixalejandro wants to merge 1 commit into
Conversation
When installing with Igniter, Application.get_env returns nil for run_endpoint and validate_endpoint because configuration has not been loaded into the application env yet, causing empty route paths (post "") to be generated in Phoenix routers. Closes ash-project#95
Author
|
Closing in favor of #102 which is already addressing this issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contributor Checklist
[✓] Did you add tests for your changes?
[✓] Did you update any relevant documentation?
Description
Closes #95.
When installing
ash_typescriptwith Igniter (mix igniter.install ash_typescript),add_rpc_routes/2previously readrun_endpointandvalidate_endpointviaApplication.get_env(:ash_typescript, ...)before configuration was loaded into the runtime application env. This evaluated toniland generated invalid empty route paths in the Phoenix router:This PR:
run_endpointto"/rpc/run"andvalidate_endpointto"/rpc/validate"when not explicitly set or configured as a string.test/mix_tasks/install_test.exsverifying that valid RPC routes are appended to Phoenix routers and empty route paths are refuted.