Merge branch 'PMSManager_refactor'
Some checks reported errors
continuous-integration/drone Build was killed
Some checks reported errors
continuous-integration/drone Build was killed
This commit is contained in:
@@ -520,6 +520,7 @@ class BnovoPMSPlugin(BasePMSPlugin):
|
||||
headers = {"Content-Type": "application/json"}
|
||||
await self._save_token_to_db(self.token)
|
||||
|
||||
<<<<<<< HEAD
|
||||
response = requests.post(url, json=payload, headers=headers, allow_redirects=False)
|
||||
if response.status_code == 302:
|
||||
self.token = response.cookies.get("SID")
|
||||
@@ -527,6 +528,19 @@ class BnovoPMSPlugin(BasePMSPlugin):
|
||||
else:
|
||||
logger.error(f"Ошибка авторизации: {response.status_code}, {response.text}")
|
||||
raise ValueError("Ошибка авторизации")
|
||||
=======
|
||||
async def _fetch_data(self):
|
||||
"""Получение данных о бронированиях с помощью эндпоинта /dashboard."""
|
||||
logger.info("Начало процесса получения данных о бронированиях.")
|
||||
|
||||
# Вызов функции получения данных аккаунта
|
||||
try:
|
||||
account_data = await self._fetch_and_log_account_data()
|
||||
logger.info(f"Данные аккаунта успешно получены:")
|
||||
except Exception as e:
|
||||
logger.error(f"Ошибка получения данных аккаунта: {e}")
|
||||
raise
|
||||
>>>>>>> PMSManager_refactor
|
||||
|
||||
async def _fetch_paginated_data(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user