0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

modules/client/publicrooms: Checkpoint empty responses.

This commit is contained in:
Jason Volk 2018-02-21 15:39:54 -08:00
parent d90f369c6d
commit 87aece1dd7

View file

@ -40,9 +40,20 @@ resource::response
get__publicrooms(client &client,
const resource::request &request)
{
std::vector<json::value> chunk;
const string_view next_batch;
const string_view prev_batch;
const int64_t total_room_count_estimate{0};
return resource::response
{
client, http::OK
client, json::members
{
{ "chunk", { chunk.data(), chunk.size() } },
{ "next_batch", next_batch },
{ "prev_batch", prev_batch },
{ "total_room_count_estimate", total_room_count_estimate },
}
};
}
@ -50,9 +61,20 @@ resource::response
post__publicrooms(client &client,
const resource::request &request)
{
std::vector<json::value> chunk;
const string_view next_batch;
const string_view prev_batch;
const int64_t total_room_count_estimate{0};
return resource::response
{
client, http::OK
client, json::members
{
{ "chunk", { chunk.data(), chunk.size() } },
{ "next_batch", next_batch },
{ "prev_batch", prev_batch },
{ "total_room_count_estimate", total_room_count_estimate },
}
};
}