mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Add RemoveTeamIcon plugin api (#9847)
This commit is contained in:
committed by
GitHub
parent
c46d8ec892
commit
2555a5d45d
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user