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
structMyActionincludeOnyx::REST::Action
params do
query dotype redirect : Boolendend
before do
redirect("https://google.com") if params.query.redirect
endend
Currently the callbacks.cr shard ignores the callbacks' return values.
Possible solutions:
Action#halt method and @halted : Bool = false variable. Action#call checks if the @halted is false before run
before do
halt(redirect("https://google.com")) if params.query.redirect
end
before doputs"Will be put anyway"end
But in this case further before callbacks are still run.
The text was updated successfully, but these errors were encountered:
Currently the callbacks.cr shard ignores the callbacks' return values.
Possible solutions:
Action#halt
method and@halted : Bool = false
variable.Action#call
checks if the@halted
isfalse
before runBut in this case further
before
callbacks are still run.The text was updated successfully, but these errors were encountered: