cd7ae5ac56
- Added Qiniu configuration options to .env.example and config.go for file uploads. - Refactored main.go to include new Qiniu service and upload handler. - Updated route registration to accommodate the new upload handler. - Enhanced documentation to include references for Qiniu upload functionality. - Removed legacy authentication handler and services to streamline the codebase.
17 lines
445 B
Go
17 lines
445 B
Go
package routes
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
|
|
commonhandler "wx_service/internal/common/handler"
|
|
)
|
|
|
|
func registerCommonRoutes(protected *gin.RouterGroup, uploadHandler *commonhandler.UploadHandler) {
|
|
// 公共接口(所有小程序共用)
|
|
common := protected.Group("/common")
|
|
{
|
|
// 七牛直传凭证:前端先拿 token,再直传文件到七牛 upload_url
|
|
common.POST("/upload/qiniu/token", uploadHandler.QiniuToken)
|
|
}
|
|
}
|