SPARK-1718 Fix trailing comma after deleted users.
This commit is contained in:
1 parent
caf6ac029c
commit
7ca11c3eee
1 file changed
+3
-1
@@ -151,10 +151,12 @@ std::string get_server_info(const api::ServiceContext& ctx) {
|
||||
|
||||
if (response.success()) {
|
||||
ss << " \"users\": [" << endl;
|
||||
bool first = true;
|
||||
for (const auto& user : response.result()->users()) {
|
||||
if (user.is_present()) {
|
||||
ss << " ";
|
||||
if (&user != &response.result()->users()[0]) ss << ",";
|
||||
if (first) { first = false; }
|
||||
else { ss << ","; }
|
||||
ss << "{ ";
|
||||
ss << "\"name\": \"" << user.name() << "\", ";
|
||||
ss << "\"operator_id\": \"" << user.user_data().exchange_user_data().cme_data().operator_id() << "\"";
|
||||
|
||||
Reference in new issue
Block a user