From fec95bcbebec30811a1542fab72750a69668f2f8 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Mon, 20 Jan 2025 19:20:05 +0100 Subject: server: Reorganise code into files --- server/src/constants.rs | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 server/src/constants.rs (limited to 'server/src/constants.rs') diff --git a/server/src/constants.rs b/server/src/constants.rs new file mode 100644 index 0000000..0f603da --- /dev/null +++ b/server/src/constants.rs @@ -0,0 +1,6 @@ +pub const DB_FILE_NAME: &str = "notes.db"; +pub const DB_SCHEMA_VERSION: i64 = 1; + +pub const LOGIN_TOKEN_EXPIRE_SECS: i64 = 40 * 24 * 3600; +/// Upon a request less than this before the expiration time, the token is refreshed. +pub const LOGIN_TOKEN_REFRESH_MARGIN: i64 = 20 * 24 * 3600; -- cgit v1.2.3-70-g09d2