Removed minecraft_id

This commit is contained in:
Sven Heidemann 2023-03-05 20:15:58 +01:00
parent f77d457fae
commit 78a4e68a90
7 changed files with 6 additions and 30 deletions

View File

@ -10,7 +10,6 @@ class UserDTO(DtoABC):
id: int = None, id: int = None,
dc_id: int = None, dc_id: int = None,
xp: int = None, xp: int = None,
minecraft_id: Optional[str] = None,
server: Optional[Server] = None, server: Optional[Server] = None,
is_technician: Optional[bool] = None, is_technician: Optional[bool] = None,
is_admin: Optional[bool] = None, is_admin: Optional[bool] = None,
@ -21,7 +20,6 @@ class UserDTO(DtoABC):
self._user_id = id self._user_id = id
self._discord_id = dc_id self._discord_id = dc_id
self._xp = xp self._xp = xp
self._minecraft_id = minecraft_id
self._server = server self._server = server
self._is_technician = is_technician self._is_technician = is_technician
@ -44,14 +42,6 @@ class UserDTO(DtoABC):
def xp(self, value: int): def xp(self, value: int):
self._xp = value self._xp = value
@property
def minecraft_id(self) -> Optional[str]:
return self._minecraft_id
@minecraft_id.setter
def minecraft_id(self, value: str):
self._minecraft_id = value
@property @property
def server(self) -> Optional[Server]: def server(self) -> Optional[Server]:
return self._server return self._server
@ -72,7 +62,6 @@ class UserDTO(DtoABC):
self._user_id = values["id"] self._user_id = values["id"]
self._discord_id = values["dcId"] self._discord_id = values["dcId"]
self._xp = values["xp"] self._xp = values["xp"]
self._minecraft_id = values["minecraftId"]
self._server = values["server"] self._server = values["server"]
def to_dict(self) -> dict: def to_dict(self) -> dict:
@ -80,7 +69,6 @@ class UserDTO(DtoABC):
"id": self._user_id, "id": self._user_id,
"dcId": self._discord_id, "dcId": self._discord_id,
"xp": self._xp, "xp": self._xp,
"minecraftId": self._minecraft_id,
"server": self._server.id, "server": self._server.id,
"isTechnician": self.is_technician, "isTechnician": self.is_technician,
"isAdmin": self.is_admin, "isAdmin": self.is_admin,

View File

@ -69,7 +69,6 @@ class AuthUserTransformer(TransformerABC):
u.id, u.id,
u.discord_id, u.discord_id,
u.xp, u.xp,
u.minecraft_id,
u.server, u.server,
cls._is_technician(u), cls._is_technician(u),
cls._is_admin(u), cls._is_admin(u),

View File

@ -33,7 +33,6 @@ class UserFilter(FilterABC):
self._discord_id = None self._discord_id = None
self._name = None self._name = None
self._xp = None self._xp = None
self._minecraft_id = None
self._ontime = None self._ontime = None
self._level: Optional[LevelFilter] = None self._level: Optional[LevelFilter] = None
self._server = None self._server = None
@ -52,9 +51,6 @@ class UserFilter(FilterABC):
if "xp" in values: if "xp" in values:
self._xp = int(values["xp"]) self._xp = int(values["xp"])
if "minecraftId" in values:
self._minecraft_id = values["minecraftId"]
if "ontime" in values: if "ontime" in values:
self._ontime = int(values["ontime"]) self._ontime = int(values["ontime"])
@ -92,9 +88,6 @@ class UserFilter(FilterABC):
if self._xp is not None: if self._xp is not None:
query = query.where(lambda x: x.xp == self._xp) query = query.where(lambda x: x.xp == self._xp)
if self._minecraft_id is not None:
query = query.where(lambda x: x.minecraft_id == self._minecraft_id)
if self._ontime is not None: if self._ontime is not None:
query = query.where(lambda x: self._client_utils.get_ontime_for_user(x) == self._ontime) query = query.where(lambda x: self._client_utils.get_ontime_for_user(x) == self._ontime)

View File

@ -18,7 +18,6 @@ export interface UserDTO {
id: number; id: number;
discordId: number; discordId: number;
xp: number; xp: number;
minecraftId: number | null;
server: number; server: number;
createdAt: string; createdAt: string;
modifiedAt: string; modifiedAt: string;

View File

@ -10,7 +10,6 @@ export interface User extends Data {
discordId?: number; discordId?: number;
name?: string; name?: string;
xp?: number; xp?: number;
minecraftId?: number;
ontime?: number; ontime?: number;
level?: Level; level?: Level;
server?: Server; server?: Server;
@ -31,7 +30,6 @@ export interface UserFilter {
discordId?: number; discordId?: number;
name?: string; name?: string;
xp?: number; xp?: number;
minecraftId?: number;
ontime?: number; ontime?: number;
level?: LevelFilter; level?: LevelFilter;
server?: ServerFilter; server?: ServerFilter;

View File

@ -77,7 +77,6 @@ export class Queries {
name name
xp xp
ontime ontime
minecraftId
level { level {
id id
name name

View File

@ -41,12 +41,12 @@
</div> </div>
</div> </div>
<div class="content-row"> <!-- <div class="content-row">-->
<div class="content-column"> <!-- <div class="content-column">-->
<div class="content-data-name">{{'view.server.profile.minecraft_id' | translate}}:</div> <!-- <div class="content-data-name">{{'view.server.profile.minecraft_id' | translate}}:</div>-->
<div class="content-data-value">{{user.minecraftId}}</div> <!-- <div class="content-data-value">{{user.minecraftId}}</div>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="content-row"> <div class="content-row">
<div class="content-column"> <div class="content-column">