upload.go 501 B

1234567891011121314151617181920
  1. package router
  2. import (
  3. "cold-logistics/app/admin/controller"
  4. "github.com/gin-gonic/gin"
  5. jwt "gogs.baozhida.cn/zoie/OAuth-core/pkg/jwtauth"
  6. )
  7. func init() {
  8. routerCheckRole = append(routerCheckRole, registerUploadRouter)
  9. }
  10. func registerUploadRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
  11. r1 := v1.Group("").Use(authMiddleware.MiddlewareFunc())
  12. {
  13. cont := controller.UploadController{}
  14. r1.POST("/upload", cont.FilesUpload)
  15. r1.POST("/apk-upload", cont.ApkUpload)
  16. }
  17. }