fix
This commit is contained in:
@@ -35,6 +35,7 @@ func main() {
|
||||
|
||||
userRepo := repositories.NewUserRepository(postgres.Pool)
|
||||
oauthRepo := repositories.NewOAuthRepository(postgres.Pool)
|
||||
positionRepo := repositories.NewPositionRepository(postgres.Pool)
|
||||
|
||||
if err := seedClient(context.Background(), oauthRepo, cfg.Client); err != nil {
|
||||
log.Fatalf("seed client: %v", err)
|
||||
@@ -43,6 +44,7 @@ func main() {
|
||||
svc := services.New(
|
||||
userRepo,
|
||||
oauthRepo,
|
||||
positionRepo,
|
||||
redis.Client,
|
||||
services.TokenConfig{
|
||||
AccessTTL: cfg.JWT.TTL,
|
||||
@@ -55,8 +57,9 @@ func main() {
|
||||
authHandler := handlers.NewAuthHandler(svc)
|
||||
oauthHandler := handlers.NewOAuthHandler(svc, cfg.Server.FrontendURL)
|
||||
consentHandler := handlers.NewConsentHandler(svc)
|
||||
positionsHandler := handlers.NewPositionsHandler(svc)
|
||||
|
||||
router := http.NewRouter(authHandler, oauthHandler, consentHandler, svc, oauthRepo, limiter)
|
||||
router := http.NewRouter(authHandler, oauthHandler, consentHandler, positionsHandler, svc, oauthRepo, limiter)
|
||||
|
||||
log.Printf("starting server on %s", cfg.Server.Addr)
|
||||
if err := router.Run(cfg.Server.Addr); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user