ocpp icon indicating copy to clipboard operation
ocpp copied to clipboard

Feat/allow passing answer from @on to @after hook

Open OSkrk opened this issue 11 months ago • 1 comments
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.

OSkrk avatar Nov 26 '24 00:11 OSkrk