zhangzengfei
2024-05-17 cef97441f455b3efc5e710fc52c1c5dbd5671fac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package routes
 
import (
    "gat1400Exchange/controller"
    "github.com/gin-gonic/gin"
)
 
func InitWebApiRouters(r *gin.RouterGroup) gin.IRoutes {
    subCtl := controller.NewSubscribeController()
 
    router := r.Group("/subscribe")
    {
        router.POST("/:id", subCtl.CreateSubscribes)
        router.PUT("/:id", subCtl.UpdateSubscribes)
        //router.GET("/:id", subCtl.Faces)
        //router.DELETE("/:id", subCtl.Faces)
    }
 
    platCtl := controller.NewSubPlatformController()
    router = r.Group("/sub_platform")
    {
        router.GET("/list", platCtl.List)
        router.POST("/create", platCtl.Create)
        router.PUT("/:id", platCtl.Update)
        router.DELETE("/:id", platCtl.Delete)
    }
 
    return r
}