🔧(backend) expose TRASHBIN_CUTOFF_DAYS

To know when a document in the trashbin will be
permanently deleted.
This commit is contained in:
Anthony LC
2025-10-03 12:37:37 +02:00
parent ed336558ac
commit 5bdf5d2210
4 changed files with 5 additions and 1 deletions

View File

@@ -2157,6 +2157,7 @@ class ConfigView(drf.views.APIView):
"LANGUAGES",
"LANGUAGE_CODE",
"SENTRY_DSN",
"TRASHBIN_CUTOFF_DAYS"
]
dict_settings = {}
for setting in array_settings:

View File

@@ -42,6 +42,7 @@ def test_api_config(is_authenticated):
response = client.get("/api/v1.0/config/")
assert response.status_code == HTTP_200_OK
assert response.json() == {
"AI_FEATURE_ENABLED": False,
"COLLABORATION_WS_URL": "http://testcollab/",
"COLLABORATION_WS_NOT_CONNECTED_READY_ONLY": True,
"CRISP_WEBSITE_ID": "123",
@@ -60,7 +61,7 @@ def test_api_config(is_authenticated):
"MEDIA_BASE_URL": "http://testserver/",
"POSTHOG_KEY": {"id": "132456", "host": "https://eu.i.posthog-test.com"},
"SENTRY_DSN": "https://sentry.test/123",
"AI_FEATURE_ENABLED": False,
"TRASHBIN_CUTOFF_DAYS": 30,
"theme_customization": {},
}
policy_list = sorted(response.headers["Content-Security-Policy"].split("; "))

View File

@@ -23,6 +23,7 @@ export const CONFIG = {
LANGUAGE_CODE: 'en-us',
POSTHOG_KEY: {},
SENTRY_DSN: null,
TRASHBIN_CUTOFF_DAYS: 30,
theme_customization: {},
} as const;

View File

@@ -27,6 +27,7 @@ export interface ConfigResponse {
MEDIA_BASE_URL?: string;
POSTHOG_KEY?: PostHogConf;
SENTRY_DSN?: string;
TRASHBIN_CUTOFF_DAYS?: number;
theme_customization?: ThemeCustomization;
}