[MM-56616] Changes for the DM for batch reporting (#26019)

* [MM-56616] Changes for the DM for batch reporting

* Use requesting user's locale

* Fix lint

* Remove unnecessary test

* Move back to file attachment

* Add default API case

* Fix i18n

* Hardcode the CSV string
Этот коммит содержится в:
Devin Binnie
2024-01-29 09:52:33 -05:00
коммит произвёл GitHub
родитель d3be94f2b9
Коммит 435da9bea7
10 изменённых файлов: 106 добавлений и 166 удалений

Просмотреть файл

@@ -52,7 +52,6 @@ const (
PostTypeMe = "me"
PostCustomTypePrefix = "custom_"
PostTypeReminder = "reminder"
PostTypeAdminReport = "system_admin_report"
PostFileidsMaxRunes = 300
PostFilenamesMaxRunes = 4000
@@ -451,8 +450,7 @@ func (o *Post) IsValid(maxPostSize int) *AppError {
PostTypeReminder,
PostTypeMe,
PostTypeWrangler,
PostTypeGMConvertedToChannel,
PostTypeAdminReport:
PostTypeGMConvertedToChannel:
default:
if !strings.HasPrefix(o.Type, PostCustomTypePrefix) {
return NewAppError("Post.IsValid", "model.post.is_valid.type.app_error", nil, "id="+o.Type, http.StatusBadRequest)

Просмотреть файл

@@ -12,6 +12,7 @@ import (
)
const (
ReportDurationAllTime = "all_time"
ReportDurationLast30Days = "last_30_days"
ReportDurationPreviousMonth = "previous_month"
ReportDurationLast6Months = "last_6_months"