diff options
author | Jesús Espino <jespinog@gmail.com> | 2018-06-22 11:15:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-22 11:15:19 +0200 |
commit | d9390244afe90ed318ac8c263c19328f16dc2562 (patch) | |
tree | 82e834f259655acec6842b7adc19dff436f8a33d /model/config.go | |
parent | 8526739066ccb00ccd24b74650a7d7b284442985 (diff) | |
download | chat-d9390244afe90ed318ac8c263c19328f16dc2562.tar.gz chat-d9390244afe90ed318ac8c263c19328f16dc2562.tar.bz2 chat-d9390244afe90ed318ac8c263c19328f16dc2562.zip |
MM-8810: Add CSV Compliance export (#8966)
* MM-8810: Add CSV Compliance export
* Only allowing to schedule actiances export throught the cli
* De-duplicating some code
* Fixes on texts
* Fixes on translations
Diffstat (limited to 'model/config.go')
-rw-r--r-- | model/config.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/model/config.go b/model/config.go index 0931cff87..868bb01d5 100644 --- a/model/config.go +++ b/model/config.go @@ -156,6 +156,7 @@ const ( TIMEZONE_SETTINGS_DEFAULT_SUPPORTED_TIMEZONES_PATH = "timezones.json" + COMPLIANCE_EXPORT_TYPE_CSV = "csv" COMPLIANCE_EXPORT_TYPE_ACTIANCE = "actiance" COMPLIANCE_EXPORT_TYPE_GLOBALRELAY = "globalrelay" GLOBALRELAY_CUSTOMER_TYPE_A9 = "A9" @@ -2366,7 +2367,7 @@ func (mes *MessageExportSettings) isValid(fs FileSettings) *AppError { return NewAppError("Config.IsValid", "model.config.is_valid.message_export.daily_runtime.app_error", nil, err.Error(), http.StatusBadRequest) } else if mes.BatchSize == nil || *mes.BatchSize < 0 { return NewAppError("Config.IsValid", "model.config.is_valid.message_export.batch_size.app_error", nil, "", http.StatusBadRequest) - } else if mes.ExportFormat == nil || (*mes.ExportFormat != COMPLIANCE_EXPORT_TYPE_ACTIANCE && *mes.ExportFormat != COMPLIANCE_EXPORT_TYPE_GLOBALRELAY) { + } else if mes.ExportFormat == nil || (*mes.ExportFormat != COMPLIANCE_EXPORT_TYPE_ACTIANCE && *mes.ExportFormat != COMPLIANCE_EXPORT_TYPE_GLOBALRELAY && *mes.ExportFormat != COMPLIANCE_EXPORT_TYPE_CSV) { return NewAppError("Config.IsValid", "model.config.is_valid.message_export.export_type.app_error", nil, "", http.StatusBadRequest) } |