diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-10-25 02:41:46 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-10-30 01:37:35 +0300 |
commit | db784dc98ba0c4e15ee7b501d909425c79c825fb (patch) | |
tree | 68270179f77c95dc49ec4ab62f9305aa651c4cd4 /src/home/api | |
parent | 0fce6c52516aba239acc81fd528dcb5051c04f68 (diff) |
web_api: rewrite to aiohttp, drop flask
Diffstat (limited to 'src/home/api')
-rw-r--r-- | src/home/api/web_api_client.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/home/api/web_api_client.py b/src/home/api/web_api_client.py index d6c9dc7..299bb6e 100644 --- a/src/home/api/web_api_client.py +++ b/src/home/api/web_api_client.py @@ -59,7 +59,7 @@ class WebAPIClient: bot: BotType, user_id: int, message: str): - return self._post('logs/bot-request/', { + return self._post('log/bot-request/', { 'bot': bot.value, 'user_id': str(user_id), 'message': message @@ -67,7 +67,7 @@ class WebAPIClient: def log_openwrt(self, lines: List[Tuple[int, str]]): - return self._post('logs/openwrt', { + return self._post('log/openwrt/', { 'logs': stringify(lines) }) @@ -159,7 +159,7 @@ class WebAPIClient: kwargs['files'] = fd try: - r = f(f'https://{domain}/api/{name}', + r = f(f'https://{domain}/{name}', headers={'X-Token': self.token}, timeout=self.timeout, **kwargs) |