tmp
zhaoqingang
2025-01-15 0bd950c8798958434c5ec61aababb9bbac4d7808
app/service/bisheng.py
@@ -26,7 +26,7 @@
        else:
            return {}
    async def register(self, username: str, password: str):
    async def register(self, username: str, password: str, token:str=""):
        public_key = await self.get_public_key_api()
        password = BishengCrypto(public_key, settings.PRIVATE_KEY).encrypt(password)
        async with httpx.AsyncClient() as client:
@@ -35,7 +35,10 @@
                json={"user_name": username, "password": password},
                headers={'Content-Type': 'application/json'}
            )
            return self._check_response(response)
            res = self._check_response(response)
            if isinstance(res, dict):
                res["id"] = res.get("user_id")
            return res
    async def login(self, username: str, password: str) -> str:
        public_key = await self.get_public_key_api()