Commit 7762b2f4 authored by Johan Ström's avatar Johan Ström

Fix empty responses from resolver, when DB error occurs

I.e. if not inited, rooms would be omitted from response instead of being an empty object.
parent 8398f820
......@@ -111,7 +111,7 @@ std::string Inventory::getDeviceRoomName(const std::string& uuid) {
}
Json::Value Inventory::getRooms() {
Json::Value result;
Json::Value result(Json::objectValue);
sqlite3_stmt *stmt;
int rc;
......@@ -282,7 +282,7 @@ bool Inventory::deleteFloorplan(const std::string& uuid) {
}
Json::Value Inventory::getFloorplans() {
Json::Value result;
Json::Value result(Json::objectValue);
sqlite3_stmt *stmt;
int rc;
......@@ -376,7 +376,7 @@ bool Inventory::deleteLocation(const std::string& uuid) {
}
Json::Value Inventory::getLocations() {
Json::Value result;
Json::Value result(Json::objectValue);
sqlite3_stmt *stmt;
int rc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment