summaryrefslogtreecommitdiff
path: root/lib/matrix_app_service/phoenix/router.ex
blob: a85a5faf16daa1e98de9f3adc683b390e263fe31 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
defmodule MatrixAppService.Phoenix.Router do

  defmacro routes() do
    quote do
      pipeline :matrix_api do
        plug :accepts, ["json"]
      end

      scope "/matrix", MatrixAppServiceWeb.V1 do
        pipe_through :matrix_api

        # scope "/v1", V1 do
          put "/transactions/:txn_id", TransactionController, :create

          get "/users/:user_id", UserController, :show
          get "/rooms/:room_alias", RoomController, :show

          # scope "/thirdparty", ThirdParty do
            get "/thirdparty/protocol/:protocol", ThirdPartyController, :show
            get "/thirdparty/user/:protocol", ThirdPartyController, :show
            get "/thirdparty/location/:protocol", ThirdPartyController, :show
            get "/thirdparty/location", ThirdPartyController, :show
            get "/thirdparty/user", ThirdPartyController, :show
          # end
        # end
      end
    end
  end
end