Remove ensure JSON helpers

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad
2025-11-09 18:30:07 +00:00
parent 7e8cf628e8
commit e42c9d2a1d
38 changed files with 228 additions and 239 deletions

View File

@@ -967,7 +967,7 @@ void MainWindow::processURLs(QList<QUrl> urls)
connect(job.get(), &Task::succeeded, this, [this, array, addonId, fileId, &dl_url, &version] {
qDebug() << "Returned CFURL Json:\n" << array->toStdString().c_str();
auto doc = Json::requireDocument(*array);
auto data = Json::ensureObject(Json::ensureObject(doc.object()), "data");
auto data = doc.object()["data"].toObject();
// No way to find out if it's a mod or a modpack before here
// And also we need to check if it ends with .zip, instead of any better way
version = FlameMod::loadIndexedPackVersion(data);