♻️(backend) generalize YProvider API config

Abstracted base URL and API key under 'y-provider' for
reuse in future endpoints, aligning with microservice naming.

Please note the YProvider API here is internal to the cluster.
In facts, we don't want these endpoints to be exposed by any ingress
This commit is contained in:
lebaudantoine
2024-12-15 18:31:43 +01:00
committed by aleb_the_flash
parent ba63358098
commit c10808b611
4 changed files with 22 additions and 13 deletions

View File

@@ -505,13 +505,21 @@ class Base(Configuration):
"day": 200,
}
# Conversion microservice
CONVERSION_API_KEY = values.Value(
environ_name="CONVERSION_API_KEY",
# Y provider microservice
# Note: Be careful, this value is currently the same as in the collaboration service.
Y_PROVIDER_API_KEY = values.Value(
environ_name="Y_PROVIDER_API_KEY",
environ_prefix=None,
)
CONVERSION_API_URL = values.Value(
environ_name="CONVERSION_API_URL",
Y_PROVIDER_API_BASE_URL = values.Value(
environ_name="Y_PROVIDER_API_BASE_URL",
environ_prefix=None,
)
# Conversion endpoint
CONVERSION_API_ENDPOINT = values.Value(
default="convert-markdown",
environ_name="CONVERSION_API_ENDPOINT",
environ_prefix=None,
)
CONVERSION_API_CONTENT_FIELD = values.Value(