fix: MM-61260: handled errors to fix linting (#29340)
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ff1ffc51dc
Коммит
961fc6bfe9
@@ -91,7 +91,6 @@ issues:
|
|||||||
channels/app/file_test.go|\
|
channels/app/file_test.go|\
|
||||||
channels/app/helper_test.go|\
|
channels/app/helper_test.go|\
|
||||||
channels/app/import_functions.go|\
|
channels/app/import_functions.go|\
|
||||||
channels/app/imports/import_validators.go|\
|
|
||||||
channels/app/integration_action.go|\
|
channels/app/integration_action.go|\
|
||||||
channels/app/job_test.go|\
|
channels/app/job_test.go|\
|
||||||
channels/app/migrations.go|\
|
channels/app/migrations.go|\
|
||||||
|
|||||||
@@ -501,14 +501,18 @@ func ValidatePostImportData(data *PostImportData, maxPostSize int) *model.AppErr
|
|||||||
if data.Reactions != nil {
|
if data.Reactions != nil {
|
||||||
for _, reaction := range *data.Reactions {
|
for _, reaction := range *data.Reactions {
|
||||||
reaction := reaction
|
reaction := reaction
|
||||||
ValidateReactionImportData(&reaction, *data.CreateAt)
|
if err := ValidateReactionImportData(&reaction, *data.CreateAt); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if data.Replies != nil {
|
if data.Replies != nil {
|
||||||
for _, reply := range *data.Replies {
|
for _, reply := range *data.Replies {
|
||||||
reply := reply
|
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 {
|
if data.Reactions != nil {
|
||||||
for _, reaction := range *data.Reactions {
|
for _, reaction := range *data.Reactions {
|
||||||
reaction := reaction
|
reaction := reaction
|
||||||
ValidateReactionImportData(&reaction, *data.CreateAt)
|
if err := ValidateReactionImportData(&reaction, *data.CreateAt); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if data.Replies != nil {
|
if data.Replies != nil {
|
||||||
for _, reply := range *data.Replies {
|
for _, reply := range *data.Replies {
|
||||||
reply := reply
|
reply := reply
|
||||||
ValidateReplyImportData(&reply, *data.CreateAt, maxPostSize)
|
if err := ValidateReplyImportData(&reply, *data.CreateAt, maxPostSize); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user