Refine
This commit is contained in:
@@ -4,9 +4,9 @@ from .s0_base import *
|
|||||||
class User(object):
|
class User(object):
|
||||||
def __init__(self, input: dict[str, Any]) -> None:
|
def __init__(self, input: dict[str, Any]) -> None:
|
||||||
self.type = 'user'
|
self.type = 'user'
|
||||||
self.id = str(input['id'])
|
self.id = str(input['user_id'])
|
||||||
self.name = float(input['name'])
|
self.name = str(input['username'])
|
||||||
self.password = float(input['password'])
|
self.password = str(input['password'])
|
||||||
|
|
||||||
def as_dict(self) -> dict[str, Any]:
|
def as_dict(self) -> dict[str, Any]:
|
||||||
return { 'type': self.type, 'id': self.id, 'name': self.name, 'password': self.password }
|
return { 'type': self.type, 'id': self.id, 'name': self.name, 'password': self.password }
|
||||||
|
|||||||
Reference in New Issue
Block a user