[MM-28985] Remove pointers to slice (part 1) (#18034)
* Remove pointers to slice (part 1) * Remove use of pointers to slice from model package (#18045) * Fix after merge
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
132f114793
Коммит
04b27ce93c
@@ -397,7 +397,7 @@ func (api *PluginAPI) GetPublicChannelsForTeam(teamID string, page, perPage int)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return *channels, err
|
||||
return channels, err
|
||||
}
|
||||
|
||||
func (api *PluginAPI) GetChannel(channelID string) (*model.Channel, *model.AppError) {
|
||||
@@ -417,7 +417,7 @@ func (api *PluginAPI) GetChannelsForTeamForUser(teamID, userID string, includeDe
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return *channels, err
|
||||
return channels, err
|
||||
}
|
||||
|
||||
func (api *PluginAPI) GetChannelStats(channelID string) (*model.ChannelStats, *model.AppError) {
|
||||
@@ -449,7 +449,7 @@ func (api *PluginAPI) SearchChannels(teamID string, term string) ([]*model.Chann
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return *channels, err
|
||||
return channels, err
|
||||
}
|
||||
|
||||
func (api *PluginAPI) CreateChannelSidebarCategory(userID, teamID string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, *model.AppError) {
|
||||
@@ -543,11 +543,11 @@ func (api *PluginAPI) GetChannelMember(channelID, userID string) (*model.Channel
|
||||
return api.app.GetChannelMember(context.Background(), channelID, userID)
|
||||
}
|
||||
|
||||
func (api *PluginAPI) GetChannelMembers(channelID string, page, perPage int) (*model.ChannelMembers, *model.AppError) {
|
||||
func (api *PluginAPI) GetChannelMembers(channelID string, page, perPage int) (model.ChannelMembers, *model.AppError) {
|
||||
return api.app.GetChannelMembersPage(channelID, page, perPage)
|
||||
}
|
||||
|
||||
func (api *PluginAPI) GetChannelMembersByIds(channelID string, userIDs []string) (*model.ChannelMembers, *model.AppError) {
|
||||
func (api *PluginAPI) GetChannelMembersByIds(channelID string, userIDs []string) (model.ChannelMembers, *model.AppError) {
|
||||
return api.app.GetChannelMembersByIds(channelID, userIDs)
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user