setup tasks auth middleware and compose

This commit is contained in:
timka
2025-12-17 17:42:16 +03:00
parent 8052af3cc7
commit 91a72f25fd
4 changed files with 12 additions and 71 deletions
+2 -2
View File
@@ -8,11 +8,11 @@ import (
"datarush/internal/competition/config"
grpcHandlers "datarush/internal/competition/handler/grpc"
"datarush/internal/competition/middleware"
"datarush/internal/competition/repository/postgres"
"datarush/internal/competition/service"
authpb "datarush/pkg/api/auth"
pb "datarush/pkg/api/competition"
"datarush/pkg/interceptor"
"github.com/jmoiron/sqlx"
_ "github.com/lib/pq"
@@ -82,7 +82,7 @@ func (s *Server) Start() error {
func (s *Server) registerGRPCServices() error {
authClient := authpb.NewAuthServiceClient(s.authConn)
authInterceptor := middleware.NewAuthInterceptor(authClient)
authInterceptor := interceptor.NewAuthInterceptor(authClient)
s.grpcServer = grpc.NewServer(
grpc.UnaryInterceptor(authInterceptor.Unary()),