architex/lib/matrix_server_web/client/info_controller.ex
2021-08-06 23:14:27 +02:00

19 lines
375 B
Elixir

defmodule MatrixServerWeb.Client.InfoController do
use MatrixServerWeb, :controller
import MatrixServerWeb.Plug.Error
@supported_versions ["r0.6.1"]
def versions(conn, _params) do
data = %{versions: @supported_versions}
conn
|> put_status(200)
|> json(data)
end
def unrecognized(conn, _params) do
put_error(conn, :unrecognized)
end
end