Improved the RenderLavaEndpoint command to parse the querystring in the route parameter #6633
+26
−2
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.
Notice
In case you are submitting a non bug-fix-PR, we highly recommend you to engage in a PR discussion first.
There are many factors we consider before accepting a pull request. This includes:
With the PR discussion we can assess your proposed changes before you start working on it so that we can come up with the best possible approach to it. This may include:
Proposed Changes
When using the Render Lava Endpoint command, if you add a query string parameter to the route - it never calls the endpoint. As soon as the query string is removed - the endpoint is called.
This PR updates the RenderLavaEndpoint lava command to allow for query string parameters.
Example:
If this PR is accepted, both of the above examples would work, and the query string parameter from the second one would be available to the lava app in the
QueryStringmerge field, just as it would have been if the endpoint were called from anhx-getor similar tag on the page.Fixes: Triumph-Tech/Triumph-Helix#17
Types of changes
What types of changes does your code introduce to Rock?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
This thread in Rocket.Chat does a good job of explaining one possible use case for this.
Documentation
In the documentation for this lava command, we could add an example showing a querystring. Maybe something like this:
Migrations
If your pull request requires a migration, please exclude the migration from the Rock.Migration project, but submit it with your pull request. Please add a note to your pull request that provides a heads up that a migration file is present.