定义接口
This commit is contained in:
@@ -55,10 +55,13 @@ func NewApplication(configPath string) (*Application, error) {
|
||||
// 7. 初始化设备仓库
|
||||
deviceRepo := repository.NewGormDeviceRepository(storage.GetDB())
|
||||
|
||||
// 8. 初始化 API 服务器
|
||||
apiServer := api.NewAPI(cfg.Server, logger, userRepo, deviceRepo, tokenService)
|
||||
// 8. 初始化计划仓库
|
||||
planRepo := repository.NewGormPlanRepository(storage.GetDB())
|
||||
|
||||
// 9. 组装 Application 对象
|
||||
// 9. 初始化 API 服务器
|
||||
apiServer := api.NewAPI(cfg.Server, logger, userRepo, deviceRepo, planRepo, tokenService)
|
||||
|
||||
// 10. 组装 Application 对象
|
||||
app := &Application{
|
||||
Config: cfg,
|
||||
Logger: logger,
|
||||
|
||||
Reference in New Issue
Block a user