uiprotect 7.15.0__py3-none-any.whl → 7.15.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of uiprotect might be problematic. Click here for more details.

uiprotect/api.py CHANGED
@@ -2089,15 +2089,9 @@ class ProtectApiClient(BaseApiClient):
2089
2089
  if not name:
2090
2090
  raise BadRequest("API key name cannot be empty")
2091
2091
 
2092
- user_id = None
2093
- if self._last_token_cookie_decode is not None:
2094
- user_id = self._last_token_cookie_decode.get("userId")
2095
- if not user_id:
2096
- raise BadRequest("User ID not available for API key creation")
2097
-
2098
2092
  response = await self.api_request(
2099
2093
  api_path="/proxy/users/api/v2",
2100
- url=f"/user/{user_id}/keys",
2094
+ url="/user/self/keys",
2101
2095
  method="post",
2102
2096
  json={"name": name},
2103
2097
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: uiprotect
3
- Version: 7.15.0
3
+ Version: 7.15.1
4
4
  Summary: Python API for Unifi Protect (Unofficial)
5
5
  License: MIT
6
6
  Author: UI Protect Maintainers
@@ -1,7 +1,7 @@
1
1
  uiprotect/__init__.py,sha256=Oz6i1tonIz4QWVnEPkbielJDJ3WQdwZVgYtjY4IwGAQ,636
2
2
  uiprotect/__main__.py,sha256=C_bHCOkv5qj6WMy-6ELoY3Y6HDhLxOa1a30CzmbZhsg,462
3
3
  uiprotect/_compat.py,sha256=HThmb1zQZCEssCxYYbQzFhJq8zYYlVaSnIEZabKc-6U,302
4
- uiprotect/api.py,sha256=9n0iMjds9sSBShURytvlJezNMD-LL3T8E0OzPX243a8,73640
4
+ uiprotect/api.py,sha256=MYAkpQTHgoWrVDlNu_szS7FapjJbOhMfFGoHV6DRHYs,73389
5
5
  uiprotect/cli/__init__.py,sha256=rVfmLd4Al4-FQZxq7QrYlfr46fBGZv6Aw5huFtmCn58,9707
6
6
  uiprotect/cli/aiports.py,sha256=wpEr2w_hY18CGpFiQM2Yc0FiVwG_1l2CzZhZLGNigvI,1576
7
7
  uiprotect/cli/backup.py,sha256=9Coo5K4YTvQIrvGVZ-NYUajGnoMIyPhK_juxQxNkdO0,36761
@@ -32,8 +32,8 @@ uiprotect/test_util/__init__.py,sha256=TLTQrqyuLcIxp7bZTk3nIZ0U9znoMTLu7QyxrJKaL
32
32
  uiprotect/test_util/anonymize.py,sha256=f-8ijU-_y9r-uAbhIPn0f0I6hzJpAkvJzc8UpWihObI,8478
33
33
  uiprotect/utils.py,sha256=2fLwXN0oz9dcVTFexzLp8jj97lcYrxLZkeEUGf5ehtU,20587
34
34
  uiprotect/websocket.py,sha256=tEyenqblNXHcjWYuf4oRP1E7buNwx6zoECMwpBr-jig,8191
35
- uiprotect-7.15.0.dist-info/LICENSE,sha256=INx18jhdbVXMEiiBANeKEbrbz57ckgzxk5uutmmcxGk,1111
36
- uiprotect-7.15.0.dist-info/METADATA,sha256=aR6aiVRJwN58_dEeklFE6Uq9wEdFxHOmt_sk5CIZYa4,11167
37
- uiprotect-7.15.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
38
- uiprotect-7.15.0.dist-info/entry_points.txt,sha256=J78AUTPrTTxgI3s7SVgrmGqDP7piX2wuuEORzhDdVRA,47
39
- uiprotect-7.15.0.dist-info/RECORD,,
35
+ uiprotect-7.15.1.dist-info/LICENSE,sha256=INx18jhdbVXMEiiBANeKEbrbz57ckgzxk5uutmmcxGk,1111
36
+ uiprotect-7.15.1.dist-info/METADATA,sha256=RI5yrUfDhDn5ZCRbytbZ3VOaMcEAIuK7z2lTirOrrb8,11167
37
+ uiprotect-7.15.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
38
+ uiprotect-7.15.1.dist-info/entry_points.txt,sha256=J78AUTPrTTxgI3s7SVgrmGqDP7piX2wuuEORzhDdVRA,47
39
+ uiprotect-7.15.1.dist-info/RECORD,,