mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-10 01:40:25 +08:00
refactor: code review
This commit is contained in:
21
server/internal/msg/router/msg.go
Normal file
21
server/internal/msg/router/msg.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"mayfly-go/internal/msg/api"
|
||||
"mayfly-go/internal/msg/application"
|
||||
"mayfly-go/pkg/req"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func InitMsgRouter(router *gin.RouterGroup) {
|
||||
msg := router.Group("msgs")
|
||||
a := &api.Msg{
|
||||
MsgApp: application.GetMsgApp(),
|
||||
}
|
||||
{
|
||||
msg.GET("/self", func(c *gin.Context) {
|
||||
req.NewCtxWithGin(c).Handle(a.GetMsgs)
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user