fix auth interceptors in task and user services;

This commit is contained in:
timka
2025-12-17 18:04:49 +03:00
parent 6fd31915b9
commit 400e26cfff
4 changed files with 52 additions and 1 deletions
+7
View File
@@ -17,6 +17,7 @@ import (
"github.com/jmoiron/sqlx"
_ "github.com/lib/pq"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/reflection"
)
@@ -46,6 +47,12 @@ func (s *Server) Start() error {
}
s.db = db
authConn, err := grpc.Dial(s.config.AuthSvcAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
return fmt.Errorf("failed to connect to auth service: %w", err)
}
s.authConn = authConn
if err := s.registerGRPCServices(); err != nil {
return fmt.Errorf("failed to register gRPC services: %w", err)
}