ocpp
ocpp copied to clipboard
Feat/allow passing answer from @on to @after hook
trafficstars
This PR addresses the feature discussed here, allowing the response sent inside the @on to be passed to the @after hook for further processing (avoiding the use of temp variables). The feature enables the @after decorator to accept an inject_response parameter, which can be used to control whether the response from the _on_action handler is passed to the _after_action handler, and guarantees backwards compatibility.
@OrangeTux , @tropxy, @HugoJP1, @mdwcrft would like to know you guy's feedback on this.