Get banned/elevation properties from View.json

This commit is contained in:
Tamás Bálint Misius
2025-08-28 11:43:27 +02:00
parent db0e56fc6e
commit 0f8f65623f
2 changed files with 5 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
#pragma once
#include "common/String.h"
#include "User.h"
#include <list>
#include <memory>
#include <ctime>
@@ -19,6 +20,8 @@ public:
int Comments;
int Views;
int Version;
User::Elevation authorElevation;
bool authorIsBanned;
ByteString userName;

View File

@@ -59,6 +59,8 @@ namespace http
saveInfo->Favourite = document["Favourite"].asBool();
saveInfo->Views = document["Views"].asInt();
saveInfo->Version = document["Version"].asInt();
saveInfo->authorElevation = User::ElevationFromString(document["Elevation"].asString());
saveInfo->authorIsBanned = document["IsBanned"].asBool();
}
catch (const std::exception &ex)
{