summaryrefslogtreecommitdiff
path: root/lib/matrix_app_service_web/controllers/v1/room_controller.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/matrix_app_service_web/controllers/v1/room_controller.ex')
-rw-r--r--lib/matrix_app_service_web/controllers/v1/room_controller.ex8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/matrix_app_service_web/controllers/v1/room_controller.ex b/lib/matrix_app_service_web/controllers/v1/room_controller.ex
index 460bcbf..cc84c48 100644
--- a/lib/matrix_app_service_web/controllers/v1/room_controller.ex
+++ b/lib/matrix_app_service_web/controllers/v1/room_controller.ex
@@ -11,10 +11,14 @@ defmodule MatrixAppServiceWeb.V1.RoomController do
adapter = Application.fetch_env!(:matrix_app_service, :room_adapter)
with :ok <- adapter.query_alias(room_alias) do
- send_resp(conn, 200, "{}")
+ conn
+ |> put_status(200)
+ |> json("{}")
else
_ ->
- send_resp(conn, 404, "")
+ conn
+ |> put_status(404)
+ |> json("")
end
end
end