minor changes
This commit is contained in:
@ -340,7 +340,7 @@ namespace Database {
|
||||
* parses it fully and returns a JSON containing it at the top or below a variable
|
||||
* takes the result and optionally a name for the top level variable
|
||||
*/
|
||||
crow::json::wvalue convertResultToJSON(pqxx::result &result, std::string jsonName = ""){
|
||||
crow::json::wvalue convertResultToJSON(pqxx::result &result, std::string jsonName){
|
||||
std::vector<crow::json::wvalue> jsonVector;
|
||||
for (int row = 0; row < result.size(); ++row) {
|
||||
crow::json::wvalue jsonVectorItem;
|
||||
@ -350,7 +350,7 @@ namespace Database {
|
||||
jsonVector.push_back(jsonVectorItem);
|
||||
}
|
||||
crow::json::wvalue returnJson;
|
||||
if (jsonName != ""){
|
||||
if (!jsonName.empty()){
|
||||
returnJson[jsonName] = crow::json::wvalue(jsonVector);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user