maleo-foundation 0.2.43__py3-none-any.whl → 0.2.44__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.
@@ -1,3 +1,4 @@
1
+ import inspect
1
2
  from fastapi import status
2
3
  from functools import wraps
3
4
  from typing import Awaitable, Callable, Dict, List
@@ -24,7 +25,12 @@ class BaseControllerUtils:
24
25
  """
25
26
  def decorator(func:Callable[..., Awaitable[BaseServiceRESTControllerResults]]):
26
27
  @wraps(func)
27
- async def wrapper(parameters, *args, **kwargs):
28
+ async def wrapper(*args, **kwargs):
29
+ sig = inspect.signature(func)
30
+ bound = sig.bind(*args, **kwargs)
31
+ bound.apply_defaults()
32
+
33
+ parameters = bound.arguments.get("parameters")
28
34
  expand:BaseTypes.OptionalListOfStrings = getattr(parameters, 'expand', None)
29
35
 
30
36
  #* Validate expandable fields dependencies
@@ -42,7 +48,7 @@ class BaseControllerUtils:
42
48
  )
43
49
 
44
50
  #* Call the original function
45
- result = await func(parameters, *args, **kwargs)
51
+ result = await func(*args, **kwargs)
46
52
 
47
53
  if not isinstance(result.content, Dict):
48
54
  return result
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.2.43
3
+ Version: 0.2.44
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -99,7 +99,7 @@ maleo_foundation/models/transfers/results/service/controllers/__init__.py,sha256
99
99
  maleo_foundation/models/transfers/results/service/controllers/rest.py,sha256=wCuFyOTQkuBs2cqjPsWnPy0XIsCfMqGByhrSy57qp7Y,1107
100
100
  maleo_foundation/utils/__init__.py,sha256=SRPEVoqjZoO6W8rtF_Ti8VIangg6Auwm6eHbZMdOthY,520
101
101
  maleo_foundation/utils/client.py,sha256=F5X9TUxWQgeOHjwsMpPoSRhZANQYZ_iFv0RJDTUVhrw,2820
102
- maleo_foundation/utils/controller.py,sha256=3n9HcWHqywLhfpgTkzd_NrjWNJgTwGBSokqGgJKeBAU,4132
102
+ maleo_foundation/utils/controller.py,sha256=JppDEjXu4Ktlwr-0N497AEyihlRQbbn_ttOcQVGVwXw,4322
103
103
  maleo_foundation/utils/exceptions.py,sha256=kDLTWiUauvc-fSKrEyxlGvIi2NtZIAhJ9bV3OXnpTyo,6253
104
104
  maleo_foundation/utils/extractor.py,sha256=SZXVYDHWGaA-Dd1BUydwF2HHdZqexEielS4CjL0Ceng,814
105
105
  maleo_foundation/utils/logging.py,sha256=W5Fhk_xAXVqSujaY8mv3hRH4wlQSpUn4ReuMoiKcQa4,7759
@@ -117,7 +117,7 @@ maleo_foundation/utils/loaders/credential/__init__.py,sha256=qopTKvcMVoTFwyRijeg
117
117
  maleo_foundation/utils/loaders/credential/google.py,sha256=SKsqPuFnAiCcYLf24CxKnMybhVHpgqnq1gGSlThqjts,994
118
118
  maleo_foundation/utils/loaders/key/__init__.py,sha256=hVygcC2ImHc_aVrSrOmyedR8tMUZokWUKCKOSh5ctbo,106
119
119
  maleo_foundation/utils/loaders/key/rsa.py,sha256=gDhyX6iTFtHiluuhFCozaZ3pOLKU2Y9TlrNMK_GVyGU,3796
120
- maleo_foundation-0.2.43.dist-info/METADATA,sha256=vvZgsMpUD6ZsLtRyqJ5k7Cu7kuRO_hefpn_7gVoDfgE,3598
121
- maleo_foundation-0.2.43.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
122
- maleo_foundation-0.2.43.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
123
- maleo_foundation-0.2.43.dist-info/RECORD,,
120
+ maleo_foundation-0.2.44.dist-info/METADATA,sha256=EA9P6-rGLLEbfq4Nri1Y1h14e_zIUmLmush98xoFH6I,3598
121
+ maleo_foundation-0.2.44.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
122
+ maleo_foundation-0.2.44.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
123
+ maleo_foundation-0.2.44.dist-info/RECORD,,