Small fixes.

This commit is contained in:
Brübach, Lukas 2025-11-25 09:34:40 +01:00
parent 4e31384ff1
commit 2867fbabe6
3 changed files with 9 additions and 2 deletions

View file

@ -27,6 +27,13 @@ void ArchidektApiResponseDeckListingContainer::fromJson(const QJsonObject &json)
// tags = {""}; // tags = {""};
parentFolderId = json.value("parentFolderId").toInt(); parentFolderId = json.value("parentFolderId").toInt();
owner.fromJson(json.value("owner").toObject()); owner.fromJson(json.value("owner").toObject());
auto colorsJson = json.value("colors").toObject();
for (auto color : colorsJson.keys()) {
colors[color] = colorsJson[color].toInt();
}
cardPackage = json.value("cardPackage").toString(); cardPackage = json.value("cardPackage").toString();
contest = json.value("contest").toString(); contest = json.value("contest").toString();
} }

View file

@ -3,7 +3,7 @@
void ArchidektApiResponseDeckOwner::fromJson(const QJsonObject &json) void ArchidektApiResponseDeckOwner::fromJson(const QJsonObject &json)
{ {
id = json.value("id").toInt(); id = json.value("id").toInt();
userName = json.value("userName").toString(); userName = json.value("username").toString();
avatar = QUrl(json.value("avatar").toString()); avatar = QUrl(json.value("avatar").toString());
moderator = json.value("moderator").toBool(); moderator = json.value("moderator").toBool();
pledgeLevel = json.value("pledgeLevel").toInt(); pledgeLevel = json.value("pledgeLevel").toInt();

View file

@ -19,7 +19,7 @@ public:
// Debug method for logging // Debug method for logging
void debugPrint() const; void debugPrint() const;
QString getName() const [[nodiscard]] QString getName() const
{ {
return userName; return userName;
} }