diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-11-18 03:46:05 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-11-18 03:46:05 +0300 |
commit | bbf71ac894b3f155fbc0e74d1d17a121c68e4cc5 (patch) | |
tree | a056231ae975a4e86d1e11688ca38ea86dccc3fd | |
parent | 3a500359c7b7e4a50ec97fadbab284177bdaff01 (diff) |
web_api: make endpoints naming consistent, use _ instead of -
-rw-r--r-- | src/home/api/web_api_client.py | 2 | ||||
-rwxr-xr-x | src/web_api.py | 6 |
2 files changed, 4 insertions, 4 deletions
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) |