Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add array of paths support for before/after filters #605

Merged
merged 2 commits into from
Apr 5, 2021

Conversation

sdogruyol
Copy link
Member

Description of the Change

Adds array of paths support to before/after filters. With this change you can do

before ["/path1", "path2", "path3"], "GET" do 
  puts "Doing something for get routes"
end

This will reduce code copy/paste. DRY 👍

src/kemal/dsl.cr Outdated Show resolved Hide resolved
Co-authored-by: Johannes Müller <straightshoota@gmail.com>
@sdogruyol sdogruyol merged commit 6e72ebb into master Apr 5, 2021
@sdogruyol sdogruyol deleted the before-filter-array-paths branch September 4, 2021 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants