Allow get, post, etc, to accept a module + function
Closed this issue · 1 comments
lpil commented
defmodule App do
use Clint
get "/users", App.UsersController, :index
get "/users/:id", App.UsersController, :show
post "/users", App.UsersController, :create
end
OR
defmodule App do
use Clint
get "/users", &App.UsersController.index/1
get "/users/:id", &App.UsersController.show/1
post "/users", &App.UsersController.create/1
end
Or both?
lpil commented
I think this may require us writing our own router, rather than using the plug one. Rather annoying.