mirror of
https://github.com/ijaric/voice_assistant.git
synced 2025-05-24 14:33:26 +00:00
fix: [#8] move headers project -> api
This commit is contained in:
parent
fdc50d8c55
commit
d73173ca5a
|
@ -24,7 +24,7 @@ async def make_request(http_client: httpx.AsyncClient):
|
||||||
async def inner(
|
async def inner(
|
||||||
api_method: str = "",
|
api_method: str = "",
|
||||||
method: functional_models.MethodsEnum = functional_models.MethodsEnum.GET,
|
method: functional_models.MethodsEnum = functional_models.MethodsEnum.GET,
|
||||||
headers: dict[str, str] = tests_core_settings.tests_settings.project.headers,
|
headers: dict[str, str] = tests_core_settings.tests_settings.api.headers,
|
||||||
body: dict[str, typing.Any] | None = None,
|
body: dict[str, typing.Any] | None = None,
|
||||||
jwt_token: str | None = None,
|
jwt_token: str | None = None,
|
||||||
) -> functional_models.HTTPResponse:
|
) -> functional_models.HTTPResponse:
|
||||||
|
|
|
@ -15,6 +15,7 @@ class ApiSettings(pydantic_settings.BaseSettings):
|
||||||
protocol: str = "http"
|
protocol: str = "http"
|
||||||
host: str = "0.0.0.0"
|
host: str = "0.0.0.0"
|
||||||
port: int = 8000
|
port: int = 8000
|
||||||
|
headers: dict[str, str] = {"Content-Type": "application/json"}
|
||||||
|
|
||||||
@pydantic.computed_field
|
@pydantic.computed_field
|
||||||
@property
|
@property
|
||||||
|
|
|
@ -13,4 +13,3 @@ class ProjectSettings(pydantic_settings.BaseSettings):
|
||||||
|
|
||||||
debug: bool = False
|
debug: bool = False
|
||||||
jwt_secret_key: pydantic.SecretStr = pydantic.Field(default=..., validation_alias="jwt_secret_key")
|
jwt_secret_key: pydantic.SecretStr = pydantic.Field(default=..., validation_alias="jwt_secret_key")
|
||||||
headers: dict[str, str] = {"Content-Type": "application/json"}
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ class MakeResponseCallableType(typing.Protocol):
|
||||||
api_method: str = "",
|
api_method: str = "",
|
||||||
url: str = functional_settings.tests_settings.api.get_api_url,
|
url: str = functional_settings.tests_settings.api.get_api_url,
|
||||||
method: MethodsEnum = MethodsEnum.GET,
|
method: MethodsEnum = MethodsEnum.GET,
|
||||||
headers: dict[str, str] = functional_settings.tests_settings.project.headers,
|
headers: dict[str, str] = functional_settings.tests_settings.api.headers,
|
||||||
body: dict[str, typing.Any] | None = None,
|
body: dict[str, typing.Any] | None = None,
|
||||||
jwt_token: str | None = None,
|
jwt_token: str | None = None,
|
||||||
) -> HTTPResponse:
|
) -> HTTPResponse:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user