You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm thinking about add BeforeAction and AfterAction for this project.
The main reason here is using middleware can add generic logic with request, response next way, but for our controller methods aka endpoints, is there a way to intercept the result around the method? The BeforeAction AfterAction is my proposal.
Romakita
changed the title
Add BeforeAction and AfterAction decorators and hooks
[Decorator] Add BeforeAction and AfterAction decorators and hooks
Jan 15, 2017
Hi @Romakita and @alexproca ,
I'm thinking about add
BeforeAction
andAfterAction
for this project.The main reason here is using middleware can add generic logic with
request, response next
way, but for our controller methods aka endpoints, is there a way to intercept the result around the method? TheBeforeAction AfterAction
is my proposal.For example
With
AfterAction
, I have a way to change the data before render to the page.For global Actions, we can register these functions in ServerLoader.
Do you guys think it's a right way to go? or you guys have any idea on this?
Comments are very welcome.
Thanks,
Vincent
The text was updated successfully, but these errors were encountered: