-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
Description
struct MyAction
include Onyx::REST::Action
params do
query do
type redirect : Bool
end
end
before do
redirect("https://google.com") if params.query.redirect
end
endCurrently the callbacks.cr shard ignores the callbacks' return values.
Possible solutions:
Action#haltmethod and@halted : Bool = falsevariable.Action#callchecks if the@haltedisfalsebefore run
before do
halt(redirect("https://google.com")) if params.query.redirect
end
before do
puts "Will be put anyway"
endBut in this case further before callbacks are still run.