MM-26231: Reverts plugin API breaking change. (#14852)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4d40226e02
Коммит
88a6cf0bf1
@@ -2638,7 +2638,6 @@ func (s *apiRPCServer) GetGroup(args *Z_GetGroupArgs, returns *Z_GetGroupReturns
|
||||
|
||||
type Z_GetGroupByNameArgs struct {
|
||||
A string
|
||||
B model.GroupSearchOpts
|
||||
}
|
||||
|
||||
type Z_GetGroupByNameReturns struct {
|
||||
@@ -2646,8 +2645,8 @@ type Z_GetGroupByNameReturns struct {
|
||||
B *model.AppError
|
||||
}
|
||||
|
||||
func (g *apiRPCClient) GetGroupByName(name string, opts model.GroupSearchOpts) (*model.Group, *model.AppError) {
|
||||
_args := &Z_GetGroupByNameArgs{name, opts}
|
||||
func (g *apiRPCClient) GetGroupByName(name string) (*model.Group, *model.AppError) {
|
||||
_args := &Z_GetGroupByNameArgs{name}
|
||||
_returns := &Z_GetGroupByNameReturns{}
|
||||
if err := g.client.Call("Plugin.GetGroupByName", _args, _returns); err != nil {
|
||||
log.Printf("RPC call to GetGroupByName API failed: %s", err.Error())
|
||||
@@ -2657,9 +2656,9 @@ func (g *apiRPCClient) GetGroupByName(name string, opts model.GroupSearchOpts) (
|
||||
|
||||
func (s *apiRPCServer) GetGroupByName(args *Z_GetGroupByNameArgs, returns *Z_GetGroupByNameReturns) error {
|
||||
if hook, ok := s.impl.(interface {
|
||||
GetGroupByName(name string, opts model.GroupSearchOpts) (*model.Group, *model.AppError)
|
||||
GetGroupByName(name string) (*model.Group, *model.AppError)
|
||||
}); ok {
|
||||
returns.A, returns.B = hook.GetGroupByName(args.A, args.B)
|
||||
returns.A, returns.B = hook.GetGroupByName(args.A)
|
||||
} else {
|
||||
return encodableError(fmt.Errorf("API GetGroupByName called but not implemented."))
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user