mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-09-25 22:29:45 +00:00
Create server config route
This commit is contained in:
@@ -59,6 +59,29 @@ pub mod database_tables_names {
|
||||
pub const NOTIFICATIONS_TABLE: &str = "comunic_notifications";
|
||||
}
|
||||
|
||||
/// Minimal conversation policy
|
||||
pub mod conservation_policy {
|
||||
use std::time::Duration;
|
||||
|
||||
/// Minimum lifetime for inactive account (3 months)
|
||||
pub const MIN_INACTIVE_ACCOUNT_LIFETIME: Duration = Duration::from_secs(60 * 60 * 24 * 30 * 3);
|
||||
|
||||
/// Minimum lifetime for notifications (7 days)
|
||||
pub const MIN_NOTIFICATIONS_LIFETIME: Duration = Duration::from_secs(60 * 60 * 24 * 7);
|
||||
|
||||
/// Minimum lifetime for comments (1 month)
|
||||
pub const MIN_COMMENTS_LIFETIME: Duration = Duration::from_secs(60 * 60 * 24 * 30);
|
||||
|
||||
/// Minimum lifetime for posts (1 month)
|
||||
pub const MIN_POSTS_LIFETIME: Duration = Duration::from_secs(60 * 60 * 24 * 30);
|
||||
|
||||
/// Minimum conversation messages lifetime (15 days)
|
||||
pub const MIN_CONVERSATION_MESSAGES_LIFETIME: Duration = Duration::from_secs(60 * 60 * 24 * 15);
|
||||
|
||||
/// Minimum likes lifetime (1 month)
|
||||
pub const MIN_LIKES_LIFETIME: Duration = Duration::from_secs(60 * 60 * 24 * 30);
|
||||
}
|
||||
|
||||
/// WebSocket access token lifetime, in seconds
|
||||
pub const WS_ACCESS_TOKEN_LIFETIME: u64 = 10;
|
||||
|
||||
|
Reference in New Issue
Block a user