update
This commit is contained in:
@ -75,6 +75,8 @@ func main() {
|
||||
userRepo = repository.NewUserRepository(db)
|
||||
snapRepo = repository.NewStreetSnapRepository(db)
|
||||
refreshRepo = repository.NewRefreshTokenRepository(db)
|
||||
favRepo = repository.NewFavoriteRepository(db)
|
||||
histRepo = repository.NewHistoryRepository(db)
|
||||
|
||||
jwtManager = jwt.NewManager(cfg.JWT.Secret, cfg.JWT.ExpireHours)
|
||||
|
||||
@ -83,6 +85,8 @@ func main() {
|
||||
indexSvc = service.NewIndexService(brandRepo)
|
||||
snapSvc = service.NewStreetSnapService(snapRepo)
|
||||
authSvc = service.NewAuthService(userRepo, refreshRepo, jwtManager, cfg.JWT.ExpireHours, cfg.JWT.RefreshExpireHours)
|
||||
favSvc = service.NewFavoriteService(favRepo)
|
||||
histSvc = service.NewHistoryService(histRepo)
|
||||
)
|
||||
|
||||
engine := router.New(router.Options{
|
||||
@ -92,6 +96,8 @@ func main() {
|
||||
Brand: handler.NewBrandHandler(brandSvc),
|
||||
StreetSnap: handler.NewStreetSnapHandler(snapSvc),
|
||||
Auth: handler.NewAuthHandler(authSvc),
|
||||
Favorite: handler.NewFavoriteHandler(favSvc),
|
||||
History: handler.NewHistoryHandler(histSvc),
|
||||
Health: handler.NewHealthHandler(),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user