ChannelStore migration Part 3 (#15504)
* Migration finished * Change error var name * Fix imports * Fix tests * Merge with master * Doing some suggestions * More suggestions * Fix i18n Co-authored-by: Mattermod <mattermod@users.noreply.github.com> Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
5353bceaea
Коммит
bb4df5a68e
@@ -156,7 +156,7 @@ func (a *App) exportAllChannels(writer io.Writer) *model.AppError {
|
||||
channels, err := a.Srv().Store.Channel().GetAllChannelsForExportAfter(1000, afterId)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
return model.NewAppError("exportAllChannels", "app.channel.get_all.app_error", nil, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
if len(channels) == 0 {
|
||||
@@ -296,9 +296,9 @@ func (a *App) buildUserTeamAndChannelMemberships(userId string) (*[]UserTeamImpo
|
||||
func (a *App) buildUserChannelMemberships(userId string, teamId string) (*[]UserChannelImportData, *model.AppError) {
|
||||
var memberships []UserChannelImportData
|
||||
|
||||
members, err := a.Srv().Store.Channel().GetChannelMembersForExport(userId, teamId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
members, nErr := a.Srv().Store.Channel().GetChannelMembersForExport(userId, teamId)
|
||||
if nErr != nil {
|
||||
return nil, model.NewAppError("buildUserChannelMemberships", "app.channel.get_members.app_error", nil, nErr.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
category := model.PREFERENCE_CATEGORY_FAVORITE_CHANNEL
|
||||
@@ -517,7 +517,7 @@ func (a *App) exportAllDirectChannels(writer io.Writer) *model.AppError {
|
||||
for {
|
||||
channels, err := a.Srv().Store.Channel().GetAllDirectChannelsForExportAfter(1000, afterId)
|
||||
if err != nil {
|
||||
return err
|
||||
return model.NewAppError("exportAllDirectChannels", "app.channel.get_all_direct.app_error", nil, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
if len(channels) == 0 {
|
||||
|
||||
Ссылка в новой задаче
Block a user