🎨_mys_request为带uid的请求自动添加FP

This commit is contained in:
KimigaiiWuyi 2024-10-08 01:53:39 +08:00
parent cc77f82e5c
commit afa3dbd955
6 changed files with 20 additions and 35 deletions

View File

@ -456,6 +456,8 @@ class BaseMysApi:
uid = params['role_id']
elif data and 'role_id' in data:
uid = data['role_id']
elif params and 'uid' in params:
uid = params['uid']
if uid is not None:
device_id = await self.get_user_device_id(

View File

@ -54,7 +54,7 @@ async def get_uid(
bind_model: Type[Bind],
game_name: Optional[str] = None,
get_user_id: Literal[False] = False,
partten: str = r'\d+',
partten: Optional[str] = r'\d+',
) -> Optional[str]: ...
@ -65,7 +65,7 @@ async def get_uid(
bind_model: Type[Bind],
game_name: Optional[str] = None,
get_user_id: Literal[True] = True,
partten: str = r'\d+',
partten: Optional[str] = r'\d+',
) -> Tuple[Optional[str], str]: ...

18
pdm.lock generated
View File

@ -5,7 +5,7 @@
groups = ["default"]
strategy = []
lock_version = "4.4.1"
content_hash = "sha256:a64cc47816b04cfd02dc5e49fb334402dc15bcaa9b172d99b8facd33c3f005f7"
content_hash = "sha256:f51dc65584d12743cec6938b97c9ee204ed87c937c4e9724582aff37ed0bd872"
[[package]]
name = "aioboto3"
@ -562,30 +562,30 @@ files = [
[[package]]
name = "pydantic"
version = "2.9.2"
version = "2.8.2"
requires_python = ">=3.8"
summary = "Data validation using Python type hints"
dependencies = [
"annotated-types>=0.6.0",
"pydantic-core==2.23.4",
"annotated-types>=0.4.0",
"pydantic-core==2.20.1",
"typing-extensions>=4.6.1; python_version < \"3.13\"",
]
files = [
{file = "pydantic-2.9.2-py3-none-any.whl", hash = "sha256:f048cec7b26778210e28a0459867920654d48e5e62db0958433636cde4254f12"},
{file = "pydantic-2.9.2.tar.gz", hash = "sha256:d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f"},
{file = "pydantic-2.8.2-py3-none-any.whl", hash = "sha256:73ee9fddd406dc318b885c7a2eab8a6472b68b8fb5ba8150949fc3db939f23c8"},
{file = "pydantic-2.8.2.tar.gz", hash = "sha256:6f62c13d067b0755ad1c21a34bdd06c0c12625a22b0fc09c6b149816604f7c2a"},
]
[[package]]
name = "pydantic-core"
version = "2.23.4"
version = "2.20.1"
requires_python = ">=3.8"
summary = "Core functionality for Pydantic validation and serialization"
dependencies = [
"typing-extensions!=4.7.0,>=4.6.0",
]
files = [
{file = "pydantic_core-2.23.4-cp311-none-win_amd64.whl", hash = "sha256:98d134c954828488b153d88ba1f34e14259284f256180ce659e8d83e9c05eaa3"},
{file = "pydantic_core-2.23.4.tar.gz", hash = "sha256:2584f7cf844ac4d970fba483a717dbe10c1c1c96a969bf65d61ffe94df1b2863"},
{file = "pydantic_core-2.20.1-cp311-none-win_amd64.whl", hash = "sha256:40a783fb7ee353c50bd3853e626f15677ea527ae556429453685ae32280c19c2"},
{file = "pydantic_core-2.20.1.tar.gz", hash = "sha256:26ca695eeee5f9f1aeeb211ffc12f10bcb6f71e2989988fda61dabd65db878d4"},
]
[[package]]

24
poetry.lock generated
View File

@ -1432,22 +1432,6 @@ type = "legacy"
url = "https://mirrors.bfsu.edu.cn/pypi/web/simple"
reference = "mirrors"
[[package]]
name = "motor"
version = "3.6.0"
description = ""
optional = false
python-versions = "*"
files = [
{file = "motor-3.6.0-py3-none-any.whl", hash = "sha256:9f07ed96f1754963d4386944e1b52d403a5350c687edc60da487d66f98dbf894"},
{file = "motor-3.6.0.tar.gz", hash = "sha256:0ef7f520213e852bf0eac306adf631aabe849227d8aec900a2612512fb9c5b8d"},
]
[package.source]
type = "legacy"
url = "https://mirrors.bfsu.edu.cn/pypi/web/simple"
reference = "mirrors"
[[package]]
name = "mpmath"
version = "1.3.0"
@ -1888,13 +1872,13 @@ reference = "mirrors"
[[package]]
name = "pydantic"
version = "2.9.2"
version = "2.8.2"
description = ""
optional = false
python-versions = "*"
files = [
{file = "pydantic-2.9.2-py3-none-any.whl", hash = "sha256:f048cec7b26778210e28a0459867920654d48e5e62db0958433636cde4254f12"},
{file = "pydantic-2.9.2.tar.gz", hash = "sha256:d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f"},
{file = "pydantic-2.8.2-py3-none-any.whl", hash = "sha256:73ee9fddd406dc318b885c7a2eab8a6472b68b8fb5ba8150949fc3db939f23c8"},
{file = "pydantic-2.8.2.tar.gz", hash = "sha256:6f62c13d067b0755ad1c21a34bdd06c0c12625a22b0fc09c6b149816604f7c2a"},
]
[package.source]
@ -2932,4 +2916,4 @@ reference = "mirrors"
[metadata]
lock-version = "2.0"
python-versions = "^3.8.1"
content-hash = "addb4ffcd2919b28ca0f7b741a1bcb44e2c1de993cd684b1ccb3fef13fbad011"
content-hash = "e48f3c6284580a1364de55d7c8e5825ccc72728ee20168e290c9d5da4344f3e6"

View File

@ -41,9 +41,8 @@ colorama = "^0.4.6"
async-timeout = "^4.0.3"
toml = "^0.10.2"
bcrypt = "^4.0.1"
motor = "^3.3.2"
setuptools = ">=69.0.3"
pydantic = ">=2.0.0"
pydantic = ">=2.0.0, <=2.8.2"
pydantic-settings = "^2.3.4"
email-validator = "^2.2.0"
@ -123,6 +122,7 @@ dependencies = [
"bcrypt==4.0.1",
"setuptools>=69.0.3",
"email-validator>=2.2.0",
"pydantic<=2.8.2,>=2.0.0",
"pydantic-settings>=2.3.4",
]
name = "gsuid-core"

View File

@ -34,14 +34,13 @@ jmespath==1.0.1 ; python_full_version >= "3.8.1" and python_version < "4.0"
loguru==0.7.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
lxml==5.3.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
markupsafe==2.1.5 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
motor==3.6.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
mpmath==1.3.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
msgspec==0.18.6 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
multidict==6.1.0 ; python_full_version >= "3.8.1" and python_version < "4.0"
passlib==1.7.4 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
pillow==10.4.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
pydantic-settings==2.5.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
pydantic==2.9.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
pydantic==2.8.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
pypng==0.20220715.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
python-dateutil==2.9.0.post0 ; python_full_version >= "3.8.1" and python_version < "4.0"
python-multipart==0.0.12 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"