grape
grape copied to clipboard
Add callbacks around routes
Just like following:
add after callback to UserApi route with namespace and route "user_api/sign_in"
add_callback :after, "user_api/sign_in" do |params|
do_something
end
This is not something Grape supports today. It could be implemented though with either existing before / after mechanism (https://github.com/ruby-grape/grape#before-and-after) or in a separate middleware. I think it could be a useful separate gem.
I'm going to label this as a feature request and leave it open for others to comment.
Would this be similar to the way rails implements around callbacks?
Would this be similar to the way rails implements
aroundcallbacks?
That's a goal