mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-08 17:00:26 +08:00
refactor: 后端路由定义方式&请求参数绑定重构
This commit is contained in:
@@ -10,14 +10,12 @@ import (
|
||||
|
||||
func InitDbSqlExecRouter(router *gin.RouterGroup) {
|
||||
db := router.Group("/dbs/:dbId/sql-execs")
|
||||
{
|
||||
d := &api.DbSqlExec{
|
||||
DbSqlExecApp: application.GetDbSqlExecApp(),
|
||||
}
|
||||
// 获取所有数据库sql执行记录列表
|
||||
db.GET("", func(c *gin.Context) {
|
||||
rc := req.NewCtxWithGin(c)
|
||||
rc.Handle(d.DbSqlExecs)
|
||||
})
|
||||
|
||||
d := &api.DbSqlExec{
|
||||
DbSqlExecApp: application.GetDbSqlExecApp(),
|
||||
}
|
||||
|
||||
// 获取所有数据库sql执行记录列表
|
||||
req.NewGet("", d.DbSqlExecs).Group(db)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user