This commit is contained in:
dragonmuffin 2024-08-25 15:03:00 +05:00
parent bf99d521a8
commit a8ba5677d3
2 changed files with 8 additions and 6 deletions

View file

@ -30,10 +30,12 @@ type ProblemService struct {
func NewProblemService(
problemStorage ProblemStorage,
pandocClient PandocClient,
permissionService IPermissionService,
) *ProblemService {
return &ProblemService{
problemStorage: problemStorage,
pandocClient: pandocClient,
problemStorage: problemStorage,
pandocClient: pandocClient,
permissionService: permissionService,
}
}

View file

@ -53,15 +53,15 @@ func main() {
}
sessionClient := sessionv1.NewSessionServiceClient(grpcSessionClient)
permissionService := services.NewPermissionService()
problemStorage := storage.NewProblemStorage(db, logger)
problemService := services.NewProblemService(problemStorage, pandocClient)
problemService := services.NewProblemService(problemStorage, pandocClient, permissionService)
userStorage := storage.NewUserStorage(db)
userService := services.NewUserService(userStorage)
permissionService := services.NewPermissionService()
server := transport.NewTesterServer(problemService, sessionClient, permissionService, userService, logger)
server := transport.NewTesterServer(problemService, sessionClient, userService, logger)
lis, err := net.Listen("tcp", cfg.Address)
if err != nil {