Merge PR #8: refactor(backend): 添加 service 缓存端口
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"sub2api/internal/pkg/response"
|
||||
"sub2api/internal/pkg/sysutil"
|
||||
"sub2api/internal/repository"
|
||||
"sub2api/internal/service"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -19,8 +20,9 @@ type SystemHandler struct {
|
||||
|
||||
// NewSystemHandler creates a new SystemHandler
|
||||
func NewSystemHandler(rdb *redis.Client, version, buildType string) *SystemHandler {
|
||||
updateCache := repository.NewUpdateCache(rdb)
|
||||
return &SystemHandler{
|
||||
updateSvc: service.NewUpdateService(rdb, version, buildType),
|
||||
updateSvc: service.NewUpdateService(updateCache, version, buildType),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user