mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-01-06 06:35:47 +08:00
refactor: 包名变更ctx -> req
This commit is contained in:
@@ -3,7 +3,7 @@ package router
|
||||
import (
|
||||
"mayfly-go/internal/sys/api"
|
||||
"mayfly-go/internal/sys/application"
|
||||
"mayfly-go/pkg/ctx"
|
||||
"mayfly-go/pkg/req"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -13,16 +13,16 @@ func InitSysConfigRouter(router *gin.RouterGroup) {
|
||||
db := router.Group("sys/configs")
|
||||
{
|
||||
db.GET("", func(c *gin.Context) {
|
||||
ctx.NewReqCtxWithGin(c).Handle(r.Configs)
|
||||
req.NewCtxWithGin(c).Handle(r.Configs)
|
||||
})
|
||||
|
||||
db.GET("/value", func(c *gin.Context) {
|
||||
ctx.NewReqCtxWithGin(c).WithNeedToken(false).Handle(r.GetConfigValueByKey)
|
||||
req.NewCtxWithGin(c).WithNeedToken(false).Handle(r.GetConfigValueByKey)
|
||||
})
|
||||
|
||||
saveConfig := ctx.NewLogInfo("保存系统配置信息").WithSave(true)
|
||||
saveConfig := req.NewLogInfo("保存系统配置信息").WithSave(true)
|
||||
db.POST("", func(c *gin.Context) {
|
||||
ctx.NewReqCtxWithGin(c).
|
||||
req.NewCtxWithGin(c).
|
||||
WithLog(saveConfig).
|
||||
Handle(r.SaveConfig)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user