防止getPlayerList返回的json数据为null

This commit is contained in:
custompal 2022-09-01 17:45:06 +08:00
parent 38170c702e
commit d0214a13e1

View File

@ -752,6 +752,7 @@ void installWebApi() {
[=](const std::list<std::shared_ptr<void>> &info_list) mutable { [=](const std::list<std::shared_ptr<void>> &info_list) mutable {
val["code"] = API::Success; val["code"] = API::Success;
auto &data = val["data"]; auto &data = val["data"];
data = Value(arrayValue);
for (auto &info : info_list) { for (auto &info : info_list) {
auto obj = static_pointer_cast<Value>(info); auto obj = static_pointer_cast<Value>(info);
data.append(std::move(*obj)); data.append(std::move(*obj));