Add RemoveTeamIcon plugin api (#9847)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c46d8ec892
Коммит
2555a5d45d
@@ -74,16 +74,21 @@ type API interface {
|
||||
// Minimum server version: 5.6
|
||||
GetUsersInTeam(teamId string, page int, perPage int) ([]*model.User, *model.AppError)
|
||||
|
||||
// GetTeamIcon gets the Team Icon.
|
||||
// GetTeamIcon gets the team icon.
|
||||
//
|
||||
// Minimum server version: 5.6
|
||||
GetTeamIcon(teamId string) ([]byte, *model.AppError)
|
||||
|
||||
// SetTeamIcon sets the Team Icon.
|
||||
// SetTeamIcon sets the team icon.
|
||||
//
|
||||
// Minimum server version: 5.6
|
||||
SetTeamIcon(teamId string, data []byte) *model.AppError
|
||||
|
||||
// RemoveTeamIcon removes the team icon.
|
||||
//
|
||||
// Minimum server version: 5.6
|
||||
RemoveTeamIcon(teamId string) *model.AppError
|
||||
|
||||
// UpdateUser updates a user.
|
||||
UpdateUser(user *model.User) (*model.User, *model.AppError)
|
||||
|
||||
|
||||
@@ -1000,6 +1000,34 @@ func (s *apiRPCServer) SetTeamIcon(args *Z_SetTeamIconArgs, returns *Z_SetTeamIc
|
||||
return nil
|
||||
}
|
||||
|
||||
type Z_RemoveTeamIconArgs struct {
|
||||
A string
|
||||
}
|
||||
|
||||
type Z_RemoveTeamIconReturns struct {
|
||||
A *model.AppError
|
||||
}
|
||||
|
||||
func (g *apiRPCClient) RemoveTeamIcon(teamId string) *model.AppError {
|
||||
_args := &Z_RemoveTeamIconArgs{teamId}
|
||||
_returns := &Z_RemoveTeamIconReturns{}
|
||||
if err := g.client.Call("Plugin.RemoveTeamIcon", _args, _returns); err != nil {
|
||||
log.Printf("RPC call to RemoveTeamIcon API failed: %s", err.Error())
|
||||
}
|
||||
return _returns.A
|
||||
}
|
||||
|
||||
func (s *apiRPCServer) RemoveTeamIcon(args *Z_RemoveTeamIconArgs, returns *Z_RemoveTeamIconReturns) error {
|
||||
if hook, ok := s.impl.(interface {
|
||||
RemoveTeamIcon(teamId string) *model.AppError
|
||||
}); ok {
|
||||
returns.A = hook.RemoveTeamIcon(args.A)
|
||||
} else {
|
||||
return encodableError(fmt.Errorf("API RemoveTeamIcon called but not implemented."))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Z_UpdateUserArgs struct {
|
||||
A *model.User
|
||||
}
|
||||
|
||||
@@ -1833,6 +1833,22 @@ func (_m *API) RemoveReaction(reaction *model.Reaction) *model.AppError {
|
||||
return r0
|
||||
}
|
||||
|
||||
// RemoveTeamIcon provides a mock function with given fields: teamId
|
||||
func (_m *API) RemoveTeamIcon(teamId string) *model.AppError {
|
||||
ret := _m.Called(teamId)
|
||||
|
||||
var r0 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
|
||||
r0 = rf(teamId)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.AppError)
|
||||
}
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// SaveConfig provides a mock function with given fields: config
|
||||
func (_m *API) SaveConfig(config *model.Config) *model.AppError {
|
||||
ret := _m.Called(config)
|
||||
|
||||
Ссылка в новой задаче
Block a user