's'
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -22,10 +22,12 @@ class PocketBaseSDK:
|
||||
self._client: Optional[PocketBase] = None
|
||||
|
||||
def get_client(self) -> PocketBase:
|
||||
"""获取已认证的 PocketBase 客户端"""
|
||||
"""获取已认证的 PocketBase 客户端(首次登录时认证,后续复用)"""
|
||||
if self._client is None:
|
||||
import logging
|
||||
self._client = PocketBase(self.url)
|
||||
self._client.admins.auth_with_password(self.admin_email, self.admin_password)
|
||||
logging.getLogger(__name__).info("PocketBase admin 登录成功")
|
||||
return self._client
|
||||
|
||||
def collection(self, name: str):
|
||||
|
||||
Reference in New Issue
Block a user