mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-30 11:19:51 +02:00
Get banned/elevation properties from View.json
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "common/String.h"
|
#include "common/String.h"
|
||||||
|
#include "User.h"
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
@@ -19,6 +20,8 @@ public:
|
|||||||
int Comments;
|
int Comments;
|
||||||
int Views;
|
int Views;
|
||||||
int Version;
|
int Version;
|
||||||
|
User::Elevation authorElevation;
|
||||||
|
bool authorIsBanned;
|
||||||
|
|
||||||
ByteString userName;
|
ByteString userName;
|
||||||
|
|
||||||
|
@@ -59,6 +59,8 @@ namespace http
|
|||||||
saveInfo->Favourite = document["Favourite"].asBool();
|
saveInfo->Favourite = document["Favourite"].asBool();
|
||||||
saveInfo->Views = document["Views"].asInt();
|
saveInfo->Views = document["Views"].asInt();
|
||||||
saveInfo->Version = document["Version"].asInt();
|
saveInfo->Version = document["Version"].asInt();
|
||||||
|
saveInfo->authorElevation = User::ElevationFromString(document["Elevation"].asString());
|
||||||
|
saveInfo->authorIsBanned = document["IsBanned"].asBool();
|
||||||
}
|
}
|
||||||
catch (const std::exception &ex)
|
catch (const std::exception &ex)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user