mirror of
https://github.com/mattermost/mattermost.git
synced 2026-10-24 23:34:52 +08:00
fix: MM-61260: handled errors to fix linting (#29340)
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
This commit is contained in:
co-authored by
Ibrahim Serdar Acikgoz
parent
ff1ffc51dc
commit
961fc6bfe9
@@ -91,7 +91,6 @@ issues:
|
||||
channels/app/file_test.go|\
|
||||
channels/app/helper_test.go|\
|
||||
channels/app/import_functions.go|\
|
||||
channels/app/imports/import_validators.go|\
|
||||
channels/app/integration_action.go|\
|
||||
channels/app/job_test.go|\
|
||||
channels/app/migrations.go|\
|
||||
|
||||
@@ -501,14 +501,18 @@ func ValidatePostImportData(data *PostImportData, maxPostSize int) *model.AppErr
|
||||
if data.Reactions != nil {
|
||||
for _, reaction := range *data.Reactions {
|
||||
reaction := reaction
|
||||
ValidateReactionImportData(&reaction, *data.CreateAt)
|
||||
if err := ValidateReactionImportData(&reaction, *data.CreateAt); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if data.Replies != nil {
|
||||
for _, reply := range *data.Replies {
|
||||
reply := reply
|
||||
ValidateReplyImportData(&reply, *data.CreateAt, maxPostSize)
|
||||
if err := ValidateReplyImportData(&reply, *data.CreateAt, maxPostSize); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -617,14 +621,18 @@ func ValidateDirectPostImportData(data *DirectPostImportData, maxPostSize int) *
|
||||
if data.Reactions != nil {
|
||||
for _, reaction := range *data.Reactions {
|
||||
reaction := reaction
|
||||
ValidateReactionImportData(&reaction, *data.CreateAt)
|
||||
if err := ValidateReactionImportData(&reaction, *data.CreateAt); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if data.Replies != nil {
|
||||
for _, reply := range *data.Replies {
|
||||
reply := reply
|
||||
ValidateReplyImportData(&reply, *data.CreateAt, maxPostSize)
|
||||
if err := ValidateReplyImportData(&reply, *data.CreateAt, maxPostSize); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user