architex/lib/architex_web/client/controllers/info_controller.ex

25 lines
485 B
Elixir
Raw Normal View History

2021-09-01 12:43:55 +00:00
defmodule ArchitexWeb.Client.InfoController do
use ArchitexWeb, :controller
2021-09-01 12:43:55 +00:00
import ArchitexWeb.Error
2021-06-26 20:02:18 +00:00
@supported_versions ["r0.6.1"]
@doc """
Gets the versions of the specification supported by the server.
Action for GET /_matrix/client/versions.
"""
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