kemalcr/kemal-csrf

HTTP::Handler is not a class, it's a module

karhatsu opened this issue · 4 comments

test.cr:

require "kemal"
require "kemal-csrf"

add_handler CSRF.new

get "/" do
  "Hello World!"
end

Kemal.run

> crystal test.cr

Error in test.cr:2: while requiring "kemal-csrf"

require "kemal-csrf"
^

in lib/kemal-csrf/src/kemal-csrf.cr:13: HTTP::Handler is not a class, it's a module

class CSRF < HTTP::Handler
             ^~~~~~~~~~~~~

What am I doing wrong?

I have: Crystal 0.21.0 (2017-02-21)

@karhatsu can you use master. I need to release a new version soon 👍

Thanks, master works well. Looking forward to the new version.

@karhatsu thank you 👍