mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-04 12:26:58 +03:00
Remove ensure JSON helpers
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
7e8cf628e8
commit
e42c9d2a1d
38 changed files with 228 additions and 239 deletions
|
|
@ -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 });
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue