mirror of
https://github.com/matrix-construct/construct
synced 2024-10-31 19:08:59 +01:00
modules/federation/send_leave: Implement v2.
This commit is contained in:
parent
9aaae46ead
commit
1d58cd2266
1 changed files with 11 additions and 3 deletions
|
@ -113,14 +113,22 @@ put__send_leave(client &client,
|
||||||
event, vmopts
|
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
|
return m::resource::response
|
||||||
{
|
{
|
||||||
client, http::OK, response
|
client, response
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue