Skip to content

Commit 5bdf5d2

Browse files
committed
🔧(backend) expose TRASHBIN_CUTOFF_DAYS
To know when a document in the trashbin will be permanently deleted.
1 parent ed33655 commit 5bdf5d2

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

src/backend/core/api/viewsets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2157,6 +2157,7 @@ def get(self, request):
21572157
"LANGUAGES",
21582158
"LANGUAGE_CODE",
21592159
"SENTRY_DSN",
2160+
"TRASHBIN_CUTOFF_DAYS"
21602161
]
21612162
dict_settings = {}
21622163
for setting in array_settings:

src/backend/core/tests/test_api_config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def test_api_config(is_authenticated):
4242
response = client.get("/api/v1.0/config/")
4343
assert response.status_code == HTTP_200_OK
4444
assert response.json() == {
45+
"AI_FEATURE_ENABLED": False,
4546
"COLLABORATION_WS_URL": "http://testcollab/",
4647
"COLLABORATION_WS_NOT_CONNECTED_READY_ONLY": True,
4748
"CRISP_WEBSITE_ID": "123",
@@ -60,7 +61,7 @@ def test_api_config(is_authenticated):
6061
"MEDIA_BASE_URL": "http://testserver/",
6162
"POSTHOG_KEY": {"id": "132456", "host": "https://eu.i.posthog-test.com"},
6263
"SENTRY_DSN": "https://sentry.test/123",
63-
"AI_FEATURE_ENABLED": False,
64+
"TRASHBIN_CUTOFF_DAYS": 30,
6465
"theme_customization": {},
6566
}
6667
policy_list = sorted(response.headers["Content-Security-Policy"].split("; "))

src/frontend/apps/e2e/__tests__/app-impress/utils-common.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export const CONFIG = {
2323
LANGUAGE_CODE: 'en-us',
2424
POSTHOG_KEY: {},
2525
SENTRY_DSN: null,
26+
TRASHBIN_CUTOFF_DAYS: 30,
2627
theme_customization: {},
2728
} as const;
2829

src/frontend/apps/impress/src/core/config/api/useConfig.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export interface ConfigResponse {
2727
MEDIA_BASE_URL?: string;
2828
POSTHOG_KEY?: PostHogConf;
2929
SENTRY_DSN?: string;
30+
TRASHBIN_CUTOFF_DAYS?: number;
3031
theme_customization?: ThemeCustomization;
3132
}
3233

0 commit comments

Comments
 (0)