summaryrefslogtreecommitdiff
path: root/lib/matrix_app_service_web/controllers/v1/transaction_controller.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/matrix_app_service_web/controllers/v1/transaction_controller.ex')
-rw-r--r--lib/matrix_app_service_web/controllers/v1/transaction_controller.ex8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/matrix_app_service_web/controllers/v1/transaction_controller.ex b/lib/matrix_app_service_web/controllers/v1/transaction_controller.ex
index c2a47e3..b6210ba 100644
--- a/lib/matrix_app_service_web/controllers/v1/transaction_controller.ex
+++ b/lib/matrix_app_service_web/controllers/v1/transaction_controller.ex
@@ -1,4 +1,7 @@
defmodule MatrixAppServiceWeb.V1.TransactionController do
+ @moduledoc """
+ Controller for transactions.
+ """
use MatrixAppServiceWeb, :controller
# %{"access_token" => access_token,
@@ -75,7 +78,10 @@ defmodule MatrixAppServiceWeb.V1.TransactionController do
adapter.new_event(event)
end
- def create(conn, %{"events" => events}) do
+ @doc """
+ https://matrix.org/docs/spec/application_service/r0.1.2#put-matrix-app-v1-transactions-txnid
+ """
+ def push(conn, %{"events" => events}) do
Enum.each(events, &create_event(&1))
send_resp(conn, 200, "{}")
end