diff options
| author | zousar <[email protected]> | 2023-12-01 14:49:10 -0700 |
|---|---|---|
| committer | zousar <[email protected]> | 2023-12-01 14:49:10 -0700 |
| commit | 2b0bc6def92b846effbed29a34f284a3ec2ac01a (patch) | |
| tree | 54a35c9c2398c49066e2fd7e08fe3df251bdef2f /src/zenserver/projectstore/projectstore.cpp | |
| parent | use 32 bit offset and size in BlockStoreLocation (#581) (diff) | |
| download | zen-2b0bc6def92b846effbed29a34f284a3ec2ac01a.tar.xz zen-2b0bc6def92b846effbed29a34f284a3ec2ac01a.zip | |
Add endpoint for all chunk infos
Add endpoint for querying all chunk infos in an oplog.
Diffstat (limited to 'src/zenserver/projectstore/projectstore.cpp')
| -rw-r--r-- | src/zenserver/projectstore/projectstore.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/zenserver/projectstore/projectstore.cpp b/src/zenserver/projectstore/projectstore.cpp index c6097dea2..b19913747 100644 --- a/src/zenserver/projectstore/projectstore.cpp +++ b/src/zenserver/projectstore/projectstore.cpp @@ -2242,14 +2242,10 @@ ProjectStore::GetProjectChunks(const std::string_view ProjectId, const std::stri Response.BeginArray("chunks"sv); for (ProjectStore::Oplog::ChunkInfo& Info : ChunkInfo) { - Response << Info.ChunkId; - } - Response.EndArray(); - - Response.BeginArray("sizes"sv); - for (ProjectStore::Oplog::ChunkInfo& Info : ChunkInfo) - { - Response << Info.ChunkSize; + Response.BeginObject(); + Response << "id"sv << Info.ChunkId; + Response << "size"sv << Info.ChunkSize; + Response.EndObject(); } Response.EndArray(); |