SPARK-1718 Fix trailing comma after deleted users.

This commit is contained in:
Eric Harding committed 2018-09-20 10:27:52 -04:00
1 parent caf6ac029c
commit 7ca11c3eee
1 file changed
+3 -1
+3 -1
View File
@@ -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() << "\"";