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:
parent
a9bd77a67d
commit
8bfd2b9dfe
1 changed files with 17 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue