From c20352b22e15057c9813df85e9fed0cd630f06fa Mon Sep 17 00:00:00 2001 From: Francis Dinh Date: Wed, 5 Oct 2022 00:54:16 -0400 Subject: [PATCH] backend: update THRESHOLD constants to use time constants --- packages/backend/src/const.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/const.ts b/packages/backend/src/const.ts index 16e537858..a1ee7c126 100644 --- a/packages/backend/src/const.ts +++ b/packages/backend/src/const.ts @@ -1,12 +1,13 @@ export const MAX_NOTE_TEXT_LENGTH = 3000; +// Time constants export const SECOND = 1000; export const MINUTE = 60 * SECOND; export const HOUR = 60 * MINUTE; export const DAY = 24 * HOUR; -export const USER_ONLINE_THRESHOLD = 1000 * 60 * 10; // 10min -export const USER_ACTIVE_THRESHOLD = 1000 * 60 * 60 * 24 * 3; // 3days +export const USER_ONLINE_THRESHOLD = 10 * MINUTE; +export const USER_ACTIVE_THRESHOLD = 3 * DAY; // List of file types allowed to be viewed directly in the browser. // Anything not included here will be reported as application/octet-stream