diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-03-13 00:56:44 -0500 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-03-13 00:56:44 -0500 |
commit | 64789b507efe482586b2362bc07fa5d59cb26ef9 (patch) | |
tree | 4c80b389ee0f667c971b8d1ffbacdda699b922bb | |
parent | fddd4596c03f4dd678229574787cb0e7051554a5 (diff) | |
download | old-guff-64789b507efe482586b2362bc07fa5d59cb26ef9.tar.bz2 old-guff-64789b507efe482586b2362bc07fa5d59cb26ef9.zip |
simplify regexes
-rw-r--r-- | src/guff/handlers/test-blog.cr | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/guff/handlers/test-blog.cr b/src/guff/handlers/test-blog.cr index f22ba76..dec763c 100644 --- a/src/guff/handlers/test-blog.cr +++ b/src/guff/handlers/test-blog.cr @@ -4,11 +4,11 @@ require "../views/html/test/blog" class Guff::Handlers::TestBlogHandler < Guff::Handler def call(context : HTTP::Server::Context) case (context.request.path || "") as String - when /^\/test\/blog\/?$/ + when %r{^/test/blog/?$} draw_page(context) - when /^\/test\/blog\/set_state$/ + when %r{^/test/blog/set_state$} set_state(context) - when /^\/test\/blog\/add_post$/ + when %r{^/test/blog/add_post$} add_post(context) else call_next(context) |