File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,12 @@ func main() {
4040 addressRepo := addresses .NewPostgresAddressRepository (dbPool )
4141 cartRepo := cart .NewPostgresCartRepository (dbPool )
4242 orderRepo := orders .NewPostgresOrderRepository (dbPool )
43- authHandler := handlers .NewAuthHandler (userRepo , cfg .JWTSecret , defaultJWTExpiry )
43+
44+ // Instantiate the password hasher
45+ hasher := auth .NewBcryptPasswordHasher ()
46+
47+ // Pass the hasher to NewAuthHandler
48+ authHandler := handlers .NewAuthHandler (userRepo , hasher , cfg .JWTSecret , defaultJWTExpiry )
4449 userHandler := handlers .NewUserHandler (userRepo , addressRepo )
4550 productHandler := handlers .NewProductHandler (productRepo )
4651 categoryHandler := handlers .NewCategoryHandler (categoryRepo )
You can’t perform that action at this time.
0 commit comments