Migrate multiples methods from ChannelStore to return error interface (#14708)

Automatic Merge
Этот коммит содержится в:
Rodrigo Villablanca
2020-06-16 04:56:35 -04:00
коммит произвёл GitHub
родитель 09a0b7db61
Коммит e342b5a2f2
16 изменённых файлов: 105 добавлений и 90 удалений

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

@@ -1150,7 +1150,7 @@ func (a *App) getChannelsForPosts(teams map[string]*model.Team, data []*PostImpo
for _, postData := range data {
team := teams[*postData.Team]
if channel, ok := channels[*postData.Channel]; !ok || channel == nil {
var err *model.AppError
var err error
channel, err = a.Srv().Store.Channel().GetByName(team.Id, *postData.Channel, true)
if err != nil {
return nil, model.NewAppError("BulkImport", "app.import.import_post.channel_not_found.error", map[string]interface{}{"ChannelName": *postData.Channel}, err.Error(), http.StatusBadRequest)