architex/lib/matrix_server_web/controllers/info_controller.ex

20 lines
368 B
Elixir
Raw Normal View History

defmodule MatrixServerWeb.InfoController do
use MatrixServerWeb, :controller
2021-06-26 20:02:18 +00:00
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
2021-06-26 20:02:18 +00:00
def unrecognized(conn, _params) do
put_error(conn, :unrecognized)
end
end