MM-25263 Add group members to search and get users and create getGroupStats endpoint (#14733)

Add tests for SearchInGroup
Этот коммит содержится в:
Farhan Munshi
2020-06-18 10:22:35 -04:00
коммит произвёл GitHub
родитель f6c934d7e0
Коммит 77bee1d4f1
18 изменённых файлов: 517 добавлений и 2 удалений

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

@@ -7444,6 +7444,22 @@ func (s *TimerLayerUserStore) SearchInChannel(channelId string, term string, opt
return resultVar0, resultVar1
}
func (s *TimerLayerUserStore) SearchInGroup(groupID string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) {
start := timemodule.Now()
resultVar0, resultVar1 := s.UserStore.SearchInGroup(groupID, term, options)
elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
if s.Root.Metrics != nil {
success := "false"
if resultVar1 == nil {
success = "true"
}
s.Root.Metrics.ObserveStoreMethodDuration("UserStore.SearchInGroup", success, elapsed)
}
return resultVar0, resultVar1
}
func (s *TimerLayerUserStore) SearchNotInChannel(teamId string, channelId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) {
start := timemodule.Now()