user info + fixs

This commit is contained in:
itsdeka
2023-02-08 11:56:45 +01:00
committed by Davide Casale
parent 6693e376fc
commit 15a2e41e43
5 changed files with 102 additions and 3 deletions

View File

@@ -11,6 +11,9 @@ from datetime import datetime
from ..middleware import Middleware
class RestAuthenticatedEndpoints(Middleware):
def get_user_info(self) -> UserInfo:
return serializers.UserInfo.parse(*self._POST(f"auth/r/info/user"))
def get_wallets(self) -> List[Wallet]:
return [ serializers.Wallet.parse(*sub_data) for sub_data in self._POST("auth/r/wallets") ]