0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-03-14 05:20:17 +01:00

modules/client/notifications: Add stub array. (#87)

This commit is contained in:
Jason Volk 2019-08-12 04:22:52 -07:00
parent 76889eab6e
commit 2f4b05afdf

View file

@ -51,10 +51,37 @@ get__notifications(client &client,
request.query.get<ushort>("limit", size_t(limit_default))
};
return resource::response
resource::response::chunked response
{
client, http::OK
};
json::stack out
{
response.buf, response.flusher()
};
json::stack::object top
{
out
};
string_view next_token;
{
json::stack::array notifications
{
top, "notifications"
};
}
if(next_token)
json::stack::member
{
top, "next_token", next_token
};
top.~object();
return response;
}
resource::method