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

@@ -147,7 +147,7 @@ QList<ModPlatform::Category> ModrinthAPI::loadCategories(std::shared_ptr<QByteAr
for (auto val : arr) {
auto cat = Json::requireObject(val);
auto name = Json::requireString(cat, "name");
if (Json::ensureString(cat, "project_type", "") == projectType)
if (cat["project_type"].toString() == projectType)
categories.push_back({ name, name });
}