Fix grpc endpoint parameter permutation (#1370)

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
This commit is contained in:
Darko Draskovic 2021-02-24 13:23:50 +01:00 committed by GitHub
parent 7ba3fdb3bf
commit 9e532d2a72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ func isChannelOwnerEndpoint(svc things.Service) endpoint.Endpoint {
return nil, err return nil, err
} }
err := svc.IsChannelOwner(ctx, req.chanID, req.owner) err := svc.IsChannelOwner(ctx, req.owner, req.chanID)
return emptyRes{err: err}, err return emptyRes{err: err}, err
} }
} }

View File

@ -190,7 +190,7 @@ func (ms *metricsMiddleware) IsChannelOwner(ctx context.Context, owner, chanID s
ms.latency.With("method", "is_channel_owner").Observe(time.Since(begin).Seconds()) ms.latency.With("method", "is_channel_owner").Observe(time.Since(begin).Seconds())
}(time.Now()) }(time.Now())
return ms.svc.CanAccessByID(ctx, owner, chanID) return ms.svc.IsChannelOwner(ctx, owner, chanID)
} }
func (ms *metricsMiddleware) Identify(ctx context.Context, key string) (string, error) { func (ms *metricsMiddleware) Identify(ctx context.Context, key string) (string, error) {