0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 10:12:39 +01:00

modules: Minor cleanup versions handler.

This commit is contained in:
Jason Volk 2018-01-08 03:04:49 -08:00
parent a9bd77a67d
commit 8bfd2b9dfe

View file

@ -23,25 +23,30 @@ using namespace ircd;
resource versions_resource
{
"/_matrix/client/versions",
"/_matrix/client/versions", resource::opts
{
"Gets the versions of the specification supported by the server (2.1)"
}
};
resource::response
get_versions(client &client,
resource::request &request)
{
static const json::object object
{
R"({"versions":["r2.0.0"]})"
};
return resource::response
{
client, object
};
}
resource::method getter
{
versions_resource, "GET", []
(client &client, resource::request &request)
-> resource::response
{
static const json::object object
{
R"({"versions":["r2.0.0"]})"
};
return resource::response { client, object };
}
versions_resource, "GET", get_versions
};
mapi::header IRCD_MODULE