From 7c761dea722621a929d42bdc79e2312d1b30a1e1 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 21 Jul 2015 14:12:22 -0700 Subject: [PATCH] Fix to member listing: I wanted an object with member IDs as keys and member revisions as values, not an array. --- controller/SqliteNetworkController.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/controller/SqliteNetworkController.cpp b/controller/SqliteNetworkController.cpp index c663d1de9..700b3561a 100644 --- a/controller/SqliteNetworkController.cpp +++ b/controller/SqliteNetworkController.cpp @@ -1395,13 +1395,12 @@ unsigned int SqliteNetworkController::_doCPGet( sqlite3_reset(_sListNetworkMembers); sqlite3_bind_text(_sListNetworkMembers,1,nwids,16,SQLITE_STATIC); while (sqlite3_step(_sListNetworkMembers) == SQLITE_ROW) { - responseBody.append((responseBody.length() > 0) ? ",{\"" : "[{\""); + responseBody.append((responseBody.length() > 0) ? ",\"" : "{\""); responseBody.append((const char *)sqlite3_column_text(_sListNetworkMembers,0)); responseBody.append("\":"); responseBody.append((const char *)sqlite3_column_text(_sListNetworkMembers,1)); - responseBody.push_back('}'); } - responseBody.push_back(']'); + responseBody.push_back('}'); responseContentType = "application/json"; return 200;