From bbf71ac894b3f155fbc0e74d1d17a121c68e4cc5 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Fri, 18 Nov 2022 03:46:05 +0300 Subject: web_api: make endpoints naming consistent, use _ instead of - --- src/home/api/web_api_client.py | 2 +- src/web_api.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/home/api/web_api_client.py b/src/home/api/web_api_client.py index f359b11..f74b5a1 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('log/bot-request/', { + return self._post('log/bot_request/', { 'bot': bot.value, 'user_id': str(user_id), 'message': message diff --git a/src/web_api.py b/src/web_api.py index 8c039e0..37b9867 100755 --- a/src/web_api.py +++ b/src/web_api.py @@ -39,10 +39,10 @@ class WebAPIServer(http.HTTPServer): self.get('/', self.get_index) self.get('/sensors/data/', self.GET_sensors_data) - self.get('/sound-sensors/hits/', self.GET_sound_sensors_hits) - self.post('/sound-sensors/hits/', self.POST_sound_sensors_hits) + self.get('/sound_sensors/hits/', self.GET_sound_sensors_hits) + self.post('/sound_sensors/hits/', self.POST_sound_sensors_hits) - self.post('/log/bot-request/', self.POST_bot_request_log) + self.post('/log/bot_request/', self.POST_bot_request_log) self.post('/log/openwrt/', self.POST_openwrt_log) self.get('/inverter/consumed_energy/', self.GET_consumed_energy) -- cgit v1.2.3