mirror of
https://github.com/rjNemo/fastapi
synced 2026-06-11 21:16:45 +00:00
✏️ Minor spelling fix in routing (#221)
This commit is contained in:
parent
5f13b53ea5
commit
4a1648b04e
1 changed files with 2 additions and 2 deletions
|
|
@ -43,7 +43,7 @@ def get_app(
|
||||||
response_class: Type[Response] = JSONResponse,
|
response_class: Type[Response] = JSONResponse,
|
||||||
response_field: Field = None,
|
response_field: Field = None,
|
||||||
) -> Callable:
|
) -> Callable:
|
||||||
assert dependant.call is not None, "dependant.call must me a function"
|
assert dependant.call is not None, "dependant.call must be a function"
|
||||||
is_coroutine = asyncio.iscoroutinefunction(dependant.call)
|
is_coroutine = asyncio.iscoroutinefunction(dependant.call)
|
||||||
is_body_form = body_field and isinstance(body_field.schema, params.Form)
|
is_body_form = body_field and isinstance(body_field.schema, params.Form)
|
||||||
|
|
||||||
|
|
@ -71,7 +71,7 @@ def get_app(
|
||||||
status_code=HTTP_422_UNPROCESSABLE_ENTITY, detail=errors_out.errors()
|
status_code=HTTP_422_UNPROCESSABLE_ENTITY, detail=errors_out.errors()
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
assert dependant.call is not None, "dependant.call must me a function"
|
assert dependant.call is not None, "dependant.call must be a function"
|
||||||
if is_coroutine:
|
if is_coroutine:
|
||||||
raw_response = await dependant.call(**values)
|
raw_response = await dependant.call(**values)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue