1
0
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:
ksieuk 2023-10-08 17:05:40 +03:00
parent fdc50d8c55
commit d73173ca5a
4 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@ async def make_request(http_client: httpx.AsyncClient):
async def inner(
api_method: str = "",
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,
jwt_token: str | None = None,
) -> functional_models.HTTPResponse:

View File

@ -15,6 +15,7 @@ class ApiSettings(pydantic_settings.BaseSettings):
protocol: str = "http"
host: str = "0.0.0.0"
port: int = 8000
headers: dict[str, str] = {"Content-Type": "application/json"}
@pydantic.computed_field
@property

View File

@ -13,4 +13,3 @@ class ProjectSettings(pydantic_settings.BaseSettings):
debug: bool = False
jwt_secret_key: pydantic.SecretStr = pydantic.Field(default=..., validation_alias="jwt_secret_key")
headers: dict[str, str] = {"Content-Type": "application/json"}

View File

@ -28,7 +28,7 @@ class MakeResponseCallableType(typing.Protocol):
api_method: str = "",
url: str = functional_settings.tests_settings.api.get_api_url,
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,
jwt_token: str | None = None,
) -> HTTPResponse: