添加阿里云oss上传接口

This commit is contained in:
2025-09-29 02:18:45 +08:00
parent aa14fa3c94
commit 69c7f28971
3 changed files with 214 additions and 1 deletions

View File

@@ -1,18 +1,21 @@
package router
import (
"github.com/gin-gonic/gin"
"toutoukan/controllers/article"
"toutoukan/controllers/article/getArticleNum"
"toutoukan/controllers/comments/getcomments"
"toutoukan/controllers/comments/publishComments"
"toutoukan/controllers/file"
"toutoukan/controllers/goods"
"toutoukan/controllers/kills"
"toutoukan/controllers/notifications/getnotifications"
"toutoukan/controllers/search"
"toutoukan/controllers/system"
"toutoukan/controllers/user"
"toutoukan/controllers/user/setting"
"toutoukan/init/ratelimit"
"github.com/gin-gonic/gin"
)
func SetupRouter() *gin.Engine {
@@ -24,6 +27,7 @@ func SetupRouter() *gin.Engine {
apiGroup.POST("/kill", ratelimit.RateLimitMiddleware(), kills.Userkill)
apiGroup.POST("/getscore", user.GetScore)
apiGroup.POST("/getInfo", user.GetUserInfo)
apiGroup.POST("/change", setting.ChangeUserSetting)
}
//r.GET("/socket", jwt.JWTAuthMiddleware(), func(c *gin.Context) {
@@ -60,6 +64,10 @@ func SetupRouter() *gin.Engine {
{
notificationGroup.POST("/get", getnotifications.GetNotifications)
}
fileGroup := r.Group("/file")
{
fileGroup.POST("/upload", file.PicUpload)
}
return r
}