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() {
40
40
addressRepo := addresses .NewPostgresAddressRepository (dbPool )
41
41
cartRepo := cart .NewPostgresCartRepository (dbPool )
42
42
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 )
44
49
userHandler := handlers .NewUserHandler (userRepo , addressRepo )
45
50
productHandler := handlers .NewProductHandler (productRepo )
46
51
categoryHandler := handlers .NewCategoryHandler (categoryRepo )
You can’t perform that action at this time.
0 commit comments