(self)
| 46 | accounts = [AccountRecord.model_validate(item) for item in self.accounts_store.read()] |
| 47 | accounts.sort(key=lambda item: item.updated_at, reverse=True) |
| 48 | return [self.to_public_account(account) for account in accounts] |
| 49 | |
| 50 | def get_account(self, account_id: str) -> AccountRecord: |
| 51 | for item in self.accounts_store.read(): |
| 52 | account = AccountRecord.model_validate(item) |
| 53 | if account.id == account_id: |
| 54 | return account |
| 55 | raise NotFoundError("账号不存在", details={"account_id": account_id}) |
nothing calls this directly
no test coverage detected