Files
wx_service/internal/routes/common_routes.go
T
nepiedg bba6dc6b4f 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.
2025-12-31 03:22:16 +00:00

17 lines
449 B
Go

package routes
import (
"github.com/gin-gonic/gin"
qiniuhandler "wx_service/internal/common/qiniu/handler"
)
func registerCommonRoutes(protected *gin.RouterGroup, uploadHandler *qiniuhandler.UploadHandler) {
// 公共接口(所有小程序共用)
common := protected.Group("/common")
{
// 七牛直传凭证:前端先拿 token,再直传文件到七牛 upload_url
common.POST("/upload/qiniu/token", uploadHandler.QiniuToken)
}
}