Migration of ChannelStore Part 1 (#15235)
* Lint: remove unnecessary use of sprintf * Fix i18n * Returning the right error (InternalServerError) * Doing some suggestions * Fix store layers * Fix missed translation Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f2a8e10216
Коммит
2cb655ed67
@@ -553,7 +553,7 @@ func (s *TimerLayerChannelStore) ClearCaches() {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) ClearSidebarOnTeamLeave(userId string, teamId string) *model.AppError {
|
||||
func (s *TimerLayerChannelStore) ClearSidebarOnTeamLeave(userId string, teamId string) error {
|
||||
start := timemodule.Now()
|
||||
|
||||
err := s.ChannelStore.ClearSidebarOnTeamLeave(userId, teamId)
|
||||
@@ -697,7 +697,7 @@ func (s *TimerLayerChannelStore) Get(id string, allowFromCache bool) (*model.Cha
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetAll(teamId string) ([]*model.Channel, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) GetAll(teamId string) ([]*model.Channel, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetAll(teamId)
|
||||
@@ -857,7 +857,7 @@ func (s *TimerLayerChannelStore) GetByNames(team_id string, names []string, allo
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetChannelCounts(teamId string, userId string) (*model.ChannelCounts, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) GetChannelCounts(teamId string, userId string) (*model.ChannelCounts, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetChannelCounts(teamId, userId)
|
||||
@@ -953,7 +953,7 @@ func (s *TimerLayerChannelStore) GetChannelsBatchForIndexing(startTime int64, en
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetChannelsByIds(channelIds []string, includeDeleted bool) ([]*model.Channel, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) GetChannelsByIds(channelIds []string, includeDeleted bool) ([]*model.Channel, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetChannelsByIds(channelIds, includeDeleted)
|
||||
@@ -1017,7 +1017,7 @@ func (s *TimerLayerChannelStore) GetDeletedByName(team_id string, name string) (
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetForPost(postId string) (*model.Channel, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) GetForPost(postId string) (*model.Channel, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetForPost(postId)
|
||||
@@ -1257,7 +1257,7 @@ func (s *TimerLayerChannelStore) GetPinnedPosts(channelId string) (*model.PostLi
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetPrivateChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) GetPrivateChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetPrivateChannelsForTeam(teamId, offset, limit)
|
||||
@@ -1273,7 +1273,7 @@ func (s *TimerLayerChannelStore) GetPrivateChannelsForTeam(teamId string, offset
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetPublicChannelsByIdsForTeam(teamId string, channelIds []string) (*model.ChannelList, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) GetPublicChannelsByIdsForTeam(teamId string, channelIds []string) (*model.ChannelList, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetPublicChannelsByIdsForTeam(teamId, channelIds)
|
||||
@@ -1289,7 +1289,7 @@ func (s *TimerLayerChannelStore) GetPublicChannelsByIdsForTeam(teamId string, ch
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetPublicChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) GetPublicChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetPublicChannelsForTeam(teamId, offset, limit)
|
||||
@@ -1353,7 +1353,7 @@ func (s *TimerLayerChannelStore) GetSidebarCategoryOrder(userId string, teamId s
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) GetTeamChannels(teamId string) (*model.ChannelList, *model.AppError) {
|
||||
func (s *TimerLayerChannelStore) GetTeamChannels(teamId string) (*model.ChannelList, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
result, err := s.ChannelStore.GetTeamChannels(teamId)
|
||||
@@ -2002,7 +2002,7 @@ func (s *TimerLayerChannelStore) UpdateSidebarCategoryOrder(userId string, teamI
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *TimerLayerChannelStore) UpdateSidebarChannelCategoryOnMove(channel *model.Channel, newTeamId string) *model.AppError {
|
||||
func (s *TimerLayerChannelStore) UpdateSidebarChannelCategoryOnMove(channel *model.Channel, newTeamId string) error {
|
||||
start := timemodule.Now()
|
||||
|
||||
err := s.ChannelStore.UpdateSidebarChannelCategoryOnMove(channel, newTeamId)
|
||||
|
||||
Ссылка в новой задаче
Block a user