fix
This commit is contained in:
parent
bf99d521a8
commit
a8ba5677d3
2 changed files with 8 additions and 6 deletions
|
@ -30,10 +30,12 @@ type ProblemService struct {
|
||||||
func NewProblemService(
|
func NewProblemService(
|
||||||
problemStorage ProblemStorage,
|
problemStorage ProblemStorage,
|
||||||
pandocClient PandocClient,
|
pandocClient PandocClient,
|
||||||
|
permissionService IPermissionService,
|
||||||
) *ProblemService {
|
) *ProblemService {
|
||||||
return &ProblemService{
|
return &ProblemService{
|
||||||
problemStorage: problemStorage,
|
problemStorage: problemStorage,
|
||||||
pandocClient: pandocClient,
|
pandocClient: pandocClient,
|
||||||
|
permissionService: permissionService,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
8
main.go
8
main.go
|
@ -53,15 +53,15 @@ func main() {
|
||||||
}
|
}
|
||||||
sessionClient := sessionv1.NewSessionServiceClient(grpcSessionClient)
|
sessionClient := sessionv1.NewSessionServiceClient(grpcSessionClient)
|
||||||
|
|
||||||
|
permissionService := services.NewPermissionService()
|
||||||
|
|
||||||
problemStorage := storage.NewProblemStorage(db, logger)
|
problemStorage := storage.NewProblemStorage(db, logger)
|
||||||
problemService := services.NewProblemService(problemStorage, pandocClient)
|
problemService := services.NewProblemService(problemStorage, pandocClient, permissionService)
|
||||||
|
|
||||||
userStorage := storage.NewUserStorage(db)
|
userStorage := storage.NewUserStorage(db)
|
||||||
userService := services.NewUserService(userStorage)
|
userService := services.NewUserService(userStorage)
|
||||||
|
|
||||||
permissionService := services.NewPermissionService()
|
server := transport.NewTesterServer(problemService, sessionClient, userService, logger)
|
||||||
|
|
||||||
server := transport.NewTesterServer(problemService, sessionClient, permissionService, userService, logger)
|
|
||||||
|
|
||||||
lis, err := net.Listen("tcp", cfg.Address)
|
lis, err := net.Listen("tcp", cfg.Address)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue