//SPDX-FileCopyrightText: 2023 Yury Gubich //SPDX-License-Identifier: GPL-3.0-or-later #include "listassets.h" #include "API/helpers.h" Request::ListAssets::ListAssets (const QUrl& baseUrl): Request(createUrl(baseUrl, "/listAssets")) {} void Request::ListAssets::onSuccess (const QVariantMap& data) { QVariantMap::ConstIterator itr = data.find("assets"); if (itr == data.constEnd() || !itr->canConvert()) return Request::onError("Error receiving assets: assets are missing or not in an array", std::nullopt); emit success(qast(itr.value())); emit done(); }