bug squashin

This commit is contained in:
worker-9 2021-08-05 15:27:05 -04:00
parent 696f83a40d
commit 18d1a72dd8
2 changed files with 5 additions and 5 deletions

View file

@ -162,7 +162,7 @@ func (s *NodeServiceServer) GetExtPeers(ctx context.Context, req *nodepb.Object)
if len(macAndNetwork) != 2 {
return nil, errors.New("did not receive valid node id when fetching ext peers")
}
peers, err := GetExtPeersList(macAndNetwork[1], macAndNetwork[2])
peers, err := GetExtPeersList(macAndNetwork[0], macAndNetwork[1])
if err != nil {
return nil, err
}

View file

@ -115,7 +115,6 @@ func runGRPC(wg *sync.WaitGroup) {
s := grpc.NewServer(
authServerUnaryInterceptor(),
authServerStreamInterceptor(),
)
// Create NodeService type
srv := &controller.NodeServiceServer{}
@ -154,6 +153,7 @@ func runGRPC(wg *sync.WaitGroup) {
func authServerUnaryInterceptor() grpc.ServerOption {
return grpc.UnaryInterceptor(controller.AuthServerUnaryInterceptor)
}
func authServerStreamInterceptor() grpc.ServerOption {
return grpc.StreamInterceptor(controller.AuthServerStreamInterceptor)
}
// func authServerStreamInterceptor() grpc.ServerOption {
// return grpc.StreamInterceptor(controller.AuthServerStreamInterceptor)
// }