diff --git a/pkg/di/wire.go b/pkg/di/wire.go index 6824fac..659d1c0 100644 --- a/pkg/di/wire.go +++ b/pkg/di/wire.go @@ -35,7 +35,8 @@ func InitializeAPI(cfg config.Config) (*http.ServerHTTP, error) { usecase.NewCouponUseCase, usecase.NewWalletUseCase, usecase.NewOtpUseCase, - // usecase.NewTokenRenewUseCase, + usecase.NewTokenRenewUseCase, + usecase.NewAuthUseCase, handler.NewUserHandler, handler.NewAdminSHandler, handler.NewProductHandler, @@ -46,7 +47,8 @@ func InitializeAPI(cfg config.Config) (*http.ServerHTTP, error) { handler.NewCouponHandler, handler.NewWalletHandler, handler.NewOtpHandler, - //handler.NewRenewHandler, + handler.NewRenewHandler, + handler.NewAuthHandler, http.NewServerHTTP, ) diff --git a/pkg/di/wire_gen.go b/pkg/di/wire_gen.go index 05519ba..d4c9b4c 100644 --- a/pkg/di/wire_gen.go +++ b/pkg/di/wire_gen.go @@ -52,6 +52,9 @@ func InitializeAPI(cfg config.Config) (*http.ServerHTTP, error) { walletHandler := handler.NewWalletHandler(walletUseCase) otpUseCase := usecase.NewOtpUseCase(cfg) otpHandler := handler.NewOtpHandler(cfg, otpUseCase, userUseCase) - serverHTTP := http.NewServerHTTP(userHandler, adminHandler, cartHandler, productHandler, orderHandler, paymentHandler, wishlistHandler, couponHandler, walletHandler, otpHandler) + renewTokenUseCase := usecase.NewTokenRenewUseCase(refreshTokenRepository) + renewHandler := handler.NewRenewHandler(renewTokenUseCase) + authHandler := handler.NewAuthHandler(userUseCase, adminUsecase, cfg) + serverHTTP := http.NewServerHTTP(userHandler, adminHandler, cartHandler, productHandler, orderHandler, paymentHandler, wishlistHandler, couponHandler, walletHandler, otpHandler, renewHandler, authHandler) return serverHTTP, nil }