2021-08-06 21:14:27 +00:00
|
|
|
defmodule MatrixServerWeb.Client.InfoController do
|
2021-06-22 23:49:47 +00:00
|
|
|
use MatrixServerWeb, :controller
|
|
|
|
|
2021-08-14 13:20:42 +00:00
|
|
|
import MatrixServerWeb.Error
|
2021-06-26 20:02:18 +00:00
|
|
|
|
2021-06-22 23:49:47 +00:00
|
|
|
@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
|
2021-06-22 23:49:47 +00:00
|
|
|
end
|