add interceptors to task and competition services

This commit is contained in:
timka
2025-12-17 17:58:58 +03:00
parent c5ec20121b
commit 6fd31915b9
3 changed files with 11 additions and 9 deletions
+3 -1
View File
@@ -69,7 +69,9 @@ func (s *Server) registerGRPCServices() error {
authClient := authpb.NewAuthServiceClient(s.authConn)
authInterceptor := interceptor.NewAuthInterceptor(authClient)
s.grpcServer = grpc.NewServer()
s.grpcServer = grpc.NewServer(
grpc.UnaryInterceptor(authInterceptor.Unary()),
)
taskRepo := taskPostgresRepo.NewTaskRepository(s.db)