Migration of ChannelStore.GetMoreChannels to return plain error (#14811)
Automatic Merge
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4a974eabea
Коммит
d391fd6231
@@ -999,7 +999,7 @@ func (s SqlChannelStore) getAllChannelsQuery(opts store.ChannelSearchOpts, forCo
|
||||
return query
|
||||
}
|
||||
|
||||
func (s SqlChannelStore) GetMoreChannels(teamId string, userId string, offset int, limit int) (*model.ChannelList, *model.AppError) {
|
||||
func (s SqlChannelStore) GetMoreChannels(teamId string, userId string, offset int, limit int) (*model.ChannelList, error) {
|
||||
channels := &model.ChannelList{}
|
||||
_, err := s.GetReplica().Select(channels, `
|
||||
SELECT
|
||||
@@ -1035,7 +1035,7 @@ func (s SqlChannelStore) GetMoreChannels(teamId string, userId string, offset in
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return nil, model.NewAppError("SqlChannelStore.GetMoreChannels", "store.sql_channel.get_more_channels.get.app_error", nil, "teamId="+teamId+", userId="+userId+", err="+err.Error(), http.StatusInternalServerError)
|
||||
return nil, errors.Wrapf(err, "failed getting channels with teamId=%s and userId=%s", teamId, userId)
|
||||
}
|
||||
|
||||
return channels, nil
|
||||
|
||||
Ссылка в новой задаче
Block a user