xn-auth 0.2.35__tar.gz → 0.2.37__tar.gz
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.
- {xn_auth-0.2.35/xn_auth.egg-info → xn_auth-0.2.37}/PKG-INFO +1 -1
- {xn_auth-0.2.35 → xn_auth-0.2.37}/x_auth/enums.py +8 -0
- {xn_auth-0.2.35 → xn_auth-0.2.37}/x_auth/models.py +5 -2
- {xn_auth-0.2.35 → xn_auth-0.2.37/xn_auth.egg-info}/PKG-INFO +1 -1
- {xn_auth-0.2.35 → xn_auth-0.2.37}/.env.dist +0 -0
- {xn_auth-0.2.35 → xn_auth-0.2.37}/.gitignore +0 -0
- {xn_auth-0.2.35 → xn_auth-0.2.37}/.pre-commit-config.yaml +0 -0
- {xn_auth-0.2.35 → xn_auth-0.2.37}/README.md +0 -0
- {xn_auth-0.2.35 → xn_auth-0.2.37}/makefile +0 -0
- {xn_auth-0.2.35 → xn_auth-0.2.37}/pyproject.toml +0 -0
- {xn_auth-0.2.35 → xn_auth-0.2.37}/setup.cfg +0 -0
- {xn_auth-0.2.35 → xn_auth-0.2.37}/x_auth/controller.py +0 -0
- {xn_auth-0.2.35 → xn_auth-0.2.37}/x_auth/exceptions.py +0 -0
- {xn_auth-0.2.35 → xn_auth-0.2.37}/x_auth/middleware.py +0 -0
- {xn_auth-0.2.35 → xn_auth-0.2.37}/x_auth/types.py +0 -0
- {xn_auth-0.2.35 → xn_auth-0.2.37}/xn_auth.egg-info/SOURCES.txt +0 -0
- {xn_auth-0.2.35 → xn_auth-0.2.37}/xn_auth.egg-info/dependency_links.txt +0 -0
- {xn_auth-0.2.35 → xn_auth-0.2.37}/xn_auth.egg-info/requires.txt +0 -0
- {xn_auth-0.2.35 → xn_auth-0.2.37}/xn_auth.egg-info/top_level.txt +0 -0
|
@@ -30,7 +30,7 @@ from x_model.models import Model, TsTrait
|
|
|
30
30
|
from tortoise import Model as TortModel
|
|
31
31
|
from x_model.types import BaseUpd
|
|
32
32
|
|
|
33
|
-
from x_auth.enums import Lang, Role
|
|
33
|
+
from x_auth.enums import Lang, Role, PeerType
|
|
34
34
|
from x_auth.types import AuthUser
|
|
35
35
|
|
|
36
36
|
|
|
@@ -163,6 +163,9 @@ class Proxy(Model, TsTrait):
|
|
|
163
163
|
def dict(self):
|
|
164
164
|
return dict(scheme="socks5", hostname=self.host, port=self.port, username=self.username, password=self.password)
|
|
165
165
|
|
|
166
|
+
def str(self):
|
|
167
|
+
return f"http://{self.username}:{self.password}@{self.host}:{self.port}"
|
|
168
|
+
|
|
166
169
|
|
|
167
170
|
class Dc(TortModel):
|
|
168
171
|
id: int = SmallIntField(True)
|
|
@@ -223,7 +226,7 @@ class Peer(TortModel):
|
|
|
223
226
|
username_id: int
|
|
224
227
|
session: ForeignKeyRelation[Session] = ForeignKeyField("models.Session", "peers")
|
|
225
228
|
session_id: int
|
|
226
|
-
type =
|
|
229
|
+
type: PeerType = IntEnumField(PeerType)
|
|
227
230
|
phone_number = BigIntField(null=True) # todo: rm (already moved to Username.phone)
|
|
228
231
|
last_update_on: datetime | None = DatetimeSecField(auto_now=True)
|
|
229
232
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|