events updated
This commit is contained in:
@@ -270,7 +270,6 @@ class AuthenticationSelectEventMethods(MethodToEvent):
|
||||
)
|
||||
|
||||
|
||||
|
||||
class AuthenticationCheckTokenEventMethods(MethodToEvent):
|
||||
|
||||
event_type = "LOGIN"
|
||||
@@ -286,8 +285,8 @@ class AuthenticationCheckTokenEventMethods(MethodToEvent):
|
||||
|
||||
@classmethod
|
||||
def authentication_check_token_is_valid(
|
||||
cls,
|
||||
request,
|
||||
cls,
|
||||
request,
|
||||
):
|
||||
if get_object_via_access_key(request=request):
|
||||
return JSONResponse(
|
||||
@@ -712,9 +711,9 @@ class AuthenticationDownloadAvatarEventMethods(MethodToEvent):
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def authentication_download_avatar(cls, token_dict: Union[
|
||||
EmployeeTokenObject, OccupantTokenObject
|
||||
]):
|
||||
def authentication_download_avatar(
|
||||
cls, token_dict: Union[EmployeeTokenObject, OccupantTokenObject]
|
||||
):
|
||||
if found_user := Users.filter_one(Users.id == token_dict.user_id).data:
|
||||
expired_starts = str(
|
||||
system_arrow.now() - system_arrow.get(str(found_user.expiry_ends))
|
||||
@@ -728,6 +727,7 @@ class AuthenticationDownloadAvatarEventMethods(MethodToEvent):
|
||||
"completed": True,
|
||||
"message": "Avatar and profile is shared via user credentials",
|
||||
"data": {
|
||||
"lang": token_dict.lang,
|
||||
"full_name": found_user.person.full_name,
|
||||
"avatar": found_user.avatar,
|
||||
"remember_me": found_user.remember_me,
|
||||
|
||||
Reference in New Issue
Block a user