mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-21 00:45:18 +00:00
Add support for multiple files types
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
//! @author Pierre Hubert
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::constants::{conservation_policy, MIN_SUPPORTED_MOBILE_VERSION, password_policy, MIN_CONVERSATION_MESSAGE_LENGTH, MAX_CONVERSATION_MESSAGE_LENGTH};
|
||||
use crate::constants::{ALLOWED_CONVERSATION_FILES_TYPES, conservation_policy, CONVERSATION_FILES_MAX_SIZE, MAX_CONVERSATION_MESSAGE_LENGTH, MIN_CONVERSATION_MESSAGE_LENGTH, MIN_SUPPORTED_MOBILE_VERSION, password_policy};
|
||||
use crate::data::config::conf;
|
||||
|
||||
#[derive(Serialize)]
|
||||
@ -39,6 +39,8 @@ pub struct ServerConfig {
|
||||
data_conservation_policy: DataConservationPolicy,
|
||||
min_conversation_message_len: usize,
|
||||
max_conversation_message_len: usize,
|
||||
allowed_conversation_files_type: [&'static str; 17],
|
||||
conversation_files_max_size: usize,
|
||||
}
|
||||
|
||||
impl ServerConfig {
|
||||
@ -52,6 +54,8 @@ impl ServerConfig {
|
||||
|
||||
min_conversation_message_len: MIN_CONVERSATION_MESSAGE_LENGTH,
|
||||
max_conversation_message_len: MAX_CONVERSATION_MESSAGE_LENGTH,
|
||||
allowed_conversation_files_type: ALLOWED_CONVERSATION_FILES_TYPES,
|
||||
conversation_files_max_size: CONVERSATION_FILES_MAX_SIZE,
|
||||
|
||||
password_policy: PasswordPolicy {
|
||||
allow_email_in_password: password_policy::ALLOW_EMAIL_IN_PASSWORD,
|
||||
|
Reference in New Issue
Block a user