update
This commit is contained in:
@ -70,10 +70,11 @@ func main() {
|
||||
|
||||
// 5. 装配各层依赖
|
||||
var (
|
||||
articleRepo = repository.NewArticleRepository(db)
|
||||
brandRepo = repository.NewBrandRepository(db)
|
||||
userRepo = repository.NewUserRepository(db)
|
||||
snapRepo = repository.NewStreetSnapRepository(db)
|
||||
articleRepo = repository.NewArticleRepository(db)
|
||||
brandRepo = repository.NewBrandRepository(db)
|
||||
userRepo = repository.NewUserRepository(db)
|
||||
snapRepo = repository.NewStreetSnapRepository(db)
|
||||
refreshRepo = repository.NewRefreshTokenRepository(db)
|
||||
|
||||
jwtManager = jwt.NewManager(cfg.JWT.Secret, cfg.JWT.ExpireHours)
|
||||
|
||||
@ -81,7 +82,7 @@ func main() {
|
||||
brandSvc = service.NewBrandService(brandRepo)
|
||||
indexSvc = service.NewIndexService(brandRepo)
|
||||
snapSvc = service.NewStreetSnapService(snapRepo)
|
||||
authSvc = service.NewAuthService(userRepo, jwtManager)
|
||||
authSvc = service.NewAuthService(userRepo, refreshRepo, jwtManager, cfg.JWT.ExpireHours, cfg.JWT.RefreshExpireHours)
|
||||
)
|
||||
|
||||
engine := router.New(router.Options{
|
||||
|
||||
Reference in New Issue
Block a user