defmodule Gateway.Helpers.CommonRouter do
  defmacro __using__(_) do
    quote do
      use Plug.Router

      plug Plug.Parsers, parsers: [:json],
                         pass:  ["application/json"],
                         json_decoder: Poison

      plug :match
      plug :dispatch

      import Gateway.HTTPHelpers.Response
    end
  end
end

defmodule Gateway.Helpers.CommonRouter do
  defmacro __using__(_) do
    quote do
      use Plug.Router

      plug :match

      plug Plug.Parsers, parsers: [:json],
                         pass:  ["application/json"],
                         json_decoder: Poison

      plug :dispatch

      import Gateway.HTTPHelpers.Response
    end
  end
end

Move body parsing to where it belongs
Move body parsing to where it belongs

Nebo15/annon.api,Nebo15/annon.api