CheeseAPI 1.3.1__tar.gz → 1.3.2__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.
@@ -62,18 +62,20 @@ def validator(validator: BaseModel):
62
62
 
63
63
  _kwargs = {}
64
64
  for key in validator.model_fields.keys():
65
- _kwargs[key] = None
66
-
67
65
  for scope in [ 'path', 'args', 'form', 'cookie', 'headers' ]:
68
66
  try:
69
67
  if scope == 'path':
70
- _kwargs[key] = kwargs.get(key)
68
+ _kwargs[key] = kwargs[key]
71
69
  elif scope == 'headers':
72
- _kwargs[key] = getattr(request, scope).get(key.replace('_', '-'))
70
+ _kwargs[key] = getattr(request, scope)[key.replace('_', '-')]
73
71
  else:
74
- _kwargs[key] = getattr(request, scope).get(key)
72
+ _kwargs[key] = getattr(request, scope)[key]
75
73
 
76
74
  if _kwargs.get(key):
75
+ try:
76
+ _kwargs[key] = json.loads(_kwargs[key])
77
+ except:
78
+ ...
77
79
  break
78
80
  except:
79
81
  ...
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: CheeseAPI
3
- Version: 1.3.1
3
+ Version: 1.3.2
4
4
  Summary: 一款web协程框架。
5
5
  Project-URL: Source, https://github.com/CheeseUnknown/CheeseAPI
6
6
  Author-email: Cheese Unknown <cheese@cheese.ren>
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "CheeseAPI"
7
- version = "1.3.1"
7
+ version = "1.3.2"
8
8
  description = "一款web协程框架。"
9
9
  readme = "README.md"
10
10
  license-files = { paths = [ "LICENSE" ] }
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