Files
mayfly-go/server/internal/db/router/db_sql_exec.go

24 lines
472 B
Go
Raw Normal View History

package router
import (
2022-09-09 18:26:08 +08:00
"mayfly-go/internal/db/api"
"mayfly-go/internal/db/application"
"mayfly-go/pkg/ctx"
"github.com/gin-gonic/gin"
)
func InitDbSqlExecRouter(router *gin.RouterGroup) {
db := router.Group("/dbs/:dbId/sql-execs")
{
d := &api.DbSqlExec{
2022-09-09 18:26:08 +08:00
DbSqlExecApp: application.GetDbSqlExecApp(),
}
// 获取所有数据库sql执行记录列表
db.GET("", func(c *gin.Context) {
rc := ctx.NewReqCtxWithGin(c)
rc.Handle(d.DbSqlExecs)
})
}
}