Refactor Qiniu upload integration and remove legacy handlers
- Replaced common upload handler and service with Qiniu-specific implementations in main.go and route registration. - Deleted outdated upload_handler.go and qiniu_service.go files to streamline the codebase. - Updated route definitions to utilize the new Qiniu upload handler for improved file upload management.
This commit is contained in:
+4
-4
@@ -8,8 +8,8 @@ import (
|
||||
"wx_service/config"
|
||||
authhandler "wx_service/internal/common/auth/handler"
|
||||
authservice "wx_service/internal/common/auth/service"
|
||||
commonhandler "wx_service/internal/common/handler"
|
||||
commonservice "wx_service/internal/common/service"
|
||||
qiniuhandler "wx_service/internal/common/qiniu/handler"
|
||||
qiniuservice "wx_service/internal/common/qiniu/service"
|
||||
"wx_service/internal/database"
|
||||
"wx_service/internal/model"
|
||||
rmhandler "wx_service/internal/remove_watermark/handler"
|
||||
@@ -57,8 +57,8 @@ func main() {
|
||||
smokeLogService := smokeservice.NewSmokeLogService(database.DB)
|
||||
smokeHandler := smokehandler.NewSmokeHandler(smokeLogService)
|
||||
|
||||
qiniuService := commonservice.NewQiniuService(config.AppConfig.Qiniu)
|
||||
uploadHandler := commonhandler.NewUploadHandler(qiniuService)
|
||||
qiniuService := qiniuservice.NewQiniuService(config.AppConfig.Qiniu)
|
||||
uploadHandler := qiniuhandler.NewUploadHandler(qiniuService)
|
||||
|
||||
// 6) 注册路由:把 URL 映射到 handler
|
||||
routes.Register(router, database.DB, authHandler, videoHandler, smokeHandler, uploadHandler)
|
||||
|
||||
Reference in New Issue
Block a user