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:
parent
76889eab6e
commit
2f4b05afdf
1 changed files with 28 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue