rewrite competition service: remove http related things
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
|||||||
|
|
||||||
"datarush/internal/competition/config"
|
"datarush/internal/competition/config"
|
||||||
grpcHandlers "datarush/internal/competition/handler/grpc"
|
grpcHandlers "datarush/internal/competition/handler/grpc"
|
||||||
"datarush/internal/competition/middleware"
|
|
||||||
"datarush/internal/competition/repository/postgres"
|
"datarush/internal/competition/repository/postgres"
|
||||||
"datarush/internal/competition/service"
|
"datarush/internal/competition/service"
|
||||||
pb "datarush/pkg/api/competition"
|
pb "datarush/pkg/api/competition"
|
||||||
@@ -64,10 +63,6 @@ func (s *Server) Start() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) registerGRPCServices() error {
|
func (s *Server) registerGRPCServices() error {
|
||||||
s.grpcServer = grpc.NewServer(
|
|
||||||
grpc.UnaryInterceptor(middleware.AuthInterceptor(s.config.JWTSecret)),
|
|
||||||
)
|
|
||||||
|
|
||||||
compRepo := postgres.NewCompetitionRepository(s.db)
|
compRepo := postgres.NewCompetitionRepository(s.db)
|
||||||
compService := service.NewCompetitionService(compRepo)
|
compService := service.NewCompetitionService(compRepo)
|
||||||
compHandler := grpcHandlers.NewCompetitionHandler(compService)
|
compHandler := grpcHandlers.NewCompetitionHandler(compService)
|
||||||
@@ -95,4 +90,4 @@ func (s *Server) Stop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
log.Println("competition server stopped")
|
log.Println("competition server stopped")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user