xn-auth 0.2.51__py3-none-any.whl → 0.2.51.dev1__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.
- x_auth/controller.py +2 -1
- x_auth/models.py +1 -1
- {xn_auth-0.2.51.dist-info → xn_auth-0.2.51.dev1.dist-info}/METADATA +1 -1
- xn_auth-0.2.51.dev1.dist-info/RECORD +10 -0
- xn_auth-0.2.51.dist-info/RECORD +0 -10
- {xn_auth-0.2.51.dist-info → xn_auth-0.2.51.dev1.dist-info}/WHEEL +0 -0
- {xn_auth-0.2.51.dist-info → xn_auth-0.2.51.dev1.dist-info}/top_level.txt +0 -0
x_auth/controller.py
CHANGED
|
@@ -38,7 +38,8 @@ class Auth:
|
|
|
38
38
|
)
|
|
39
39
|
|
|
40
40
|
async def user_proc(user: WebAppUser) -> Response[XyncUser]:
|
|
41
|
-
|
|
41
|
+
user_in = await user_model.tg2in(user)
|
|
42
|
+
db_user, cr = await user_model.update_or_create(**user_in.df_unq()) # on login: update user in db from tg
|
|
42
43
|
if user.allows_write_to_pm is None:
|
|
43
44
|
try:
|
|
44
45
|
await Bot(sec).send_chat_action(user.id, "typing")
|
x_auth/models.py
CHANGED
|
@@ -82,7 +82,7 @@ class User(Model):
|
|
|
82
82
|
return (await cls[int(sid)]).blocked
|
|
83
83
|
|
|
84
84
|
@classmethod
|
|
85
|
-
async def tg_upsert(cls, u: PyroUser | AioUser
|
|
85
|
+
async def tg_upsert(cls, u: PyroUser | AioUser, blocked: bool = None) -> tuple["User", bool]:
|
|
86
86
|
user_in: dict = await cls.tg2in(u, blocked)
|
|
87
87
|
return await cls.update_or_create(user_in, username_id=u.id)
|
|
88
88
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
x_auth/controller.py,sha256=IDyamZ-_tPxVb03lIn5ofYYyKeMc5klBru4x9mDKWcw,3773
|
|
2
|
+
x_auth/enums.py,sha256=pciVrb92S9YQFMhHe6pKNYwcvtevwfMXIiG1WxAEa-Q,761
|
|
3
|
+
x_auth/exceptions.py,sha256=2B4okJxhPyNqTJXlSTfblJUQJ60bLGXdgJIu6ue7S6w,162
|
|
4
|
+
x_auth/middleware.py,sha256=JfssQomDv0J_69GfS2a_2_uyRzs26zSY6IW1Vk7m8K0,2900
|
|
5
|
+
x_auth/models.py,sha256=FQcjtezPGLDv_jFDY1KOoXFvx-pSA8tdLSn2tgo1jLk,9198
|
|
6
|
+
x_auth/types.py,sha256=xVi1A8CrGfdfS2HbaxX-X3lEJWH_1TvTk-u8TeqKzQg,1514
|
|
7
|
+
xn_auth-0.2.51.dev1.dist-info/METADATA,sha256=XYiK8bpa63JT9xnxoeoPhhDGMV3pSlYSzOqiADs7fCk,828
|
|
8
|
+
xn_auth-0.2.51.dev1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
+
xn_auth-0.2.51.dev1.dist-info/top_level.txt,sha256=ydMDkzxgQPtW-E_MNDfUAroAFZvWSqU-x_kZSA7NSFo,7
|
|
10
|
+
xn_auth-0.2.51.dev1.dist-info/RECORD,,
|
xn_auth-0.2.51.dist-info/RECORD
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
x_auth/controller.py,sha256=rV_nc6BU9B_5TeqPaDGYtqfvWVaIEnrLuknzcOM5vDQ,3701
|
|
2
|
-
x_auth/enums.py,sha256=pciVrb92S9YQFMhHe6pKNYwcvtevwfMXIiG1WxAEa-Q,761
|
|
3
|
-
x_auth/exceptions.py,sha256=2B4okJxhPyNqTJXlSTfblJUQJ60bLGXdgJIu6ue7S6w,162
|
|
4
|
-
x_auth/middleware.py,sha256=JfssQomDv0J_69GfS2a_2_uyRzs26zSY6IW1Vk7m8K0,2900
|
|
5
|
-
x_auth/models.py,sha256=V3lvrUVtS5viyqO_-Y7u2zQep5bRjPOpWmc5kweMrN0,9211
|
|
6
|
-
x_auth/types.py,sha256=xVi1A8CrGfdfS2HbaxX-X3lEJWH_1TvTk-u8TeqKzQg,1514
|
|
7
|
-
xn_auth-0.2.51.dist-info/METADATA,sha256=74gUBa5rPA2t5rnVIcvca5ITE5mxGgwx_m22BLf7Z_Y,823
|
|
8
|
-
xn_auth-0.2.51.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
-
xn_auth-0.2.51.dist-info/top_level.txt,sha256=ydMDkzxgQPtW-E_MNDfUAroAFZvWSqU-x_kZSA7NSFo,7
|
|
10
|
-
xn_auth-0.2.51.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|