添加阿里云oss上传接口
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user