mirror of
https://github.com/matrix-construct/construct
synced 2024-05-16 01:43:49 +02:00
modules/federation/send_leave: Implement v2.
This commit is contained in:
parent
9aaae46ead
commit
1d58cd2266
|
@ -113,14 +113,22 @@ put__send_leave(client &client,
|
|||
event, vmopts
|
||||
};
|
||||
|
||||
static const json::array &response
|
||||
static const json::value responses[]
|
||||
{
|
||||
"[200,{}]"
|
||||
{ "[200,{}]", json::ARRAY },
|
||||
{ "{}", json::OBJECT },
|
||||
};
|
||||
|
||||
const json::value &response
|
||||
{
|
||||
request.version == "v1"?
|
||||
responses[0]:
|
||||
responses[1]
|
||||
};
|
||||
|
||||
return m::resource::response
|
||||
{
|
||||
client, http::OK, response
|
||||
client, response
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue