[MM-13750] Add ability to search teams to plugin API (#10116)

Add SearchTeams in plugin/api,
This commit is contained in:
Adzim Zul Fahmi
2019-01-16 15:13:15 +07:00
committed by Hanzei
parent ae76d27b7d
commit dfb9241e82
5 changed files with 90 additions and 0 deletions

View File

@@ -1958,6 +1958,31 @@ func (_m *API) SearchChannels(teamId string, term string) ([]*model.Channel, *mo
return r0, r1
}
// SearchTeams provides a mock function with given fields: term
func (_m *API) SearchTeams(term string) ([]*model.Team, *model.AppError) {
ret := _m.Called(term)
var r0 []*model.Team
if rf, ok := ret.Get(0).(func(string) []*model.Team); ok {
r0 = rf(term)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Team)
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
r1 = rf(term)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
}
return r0, r1
}
// SearchUsers provides a mock function with given fields: search
func (_m *API) SearchUsers(search *model.UserSearch) ([]*model.User, *model.AppError) {
ret := _m.Called(search)