mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-30 03:09:53 +02:00
Get banned/elevation properties from View.json
This commit is contained in:
@@ -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;
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user