diff options
author | Tom Smeding <tom@tomsmeding.com> | 2025-01-20 19:20:05 +0100 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2025-01-20 19:20:05 +0100 |
commit | fec95bcbebec30811a1542fab72750a69668f2f8 (patch) | |
tree | 0c9c2c93461fd080f5e0abdbc18c528fb71fa46b /server/src/constants.rs | |
parent | ab4f5e73a6df4ae8c7249cf45b9c18fb234e5e5b (diff) |
server: Reorganise code into files
Diffstat (limited to 'server/src/constants.rs')
-rw-r--r-- | server/src/constants.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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; |