router/index.go
@@ -1,6 +1,7 @@ package router import ( v1 "apsClient/api/v1" "apsClient/conf" _ "apsClient/docs" "github.com/gin-contrib/cors" @@ -28,5 +29,15 @@ c.JSON(http.StatusOK, "ok") }) } v1Group := Router.Group("v1") // 接收通知 noticeApi := new(v1.NoticeApi) noticeGroup := v1Group.Group("notice") { noticeGroup.POST("task/start", noticeApi.TaskStart) // 任务开启通知 } return Router }