18 lines
406 B
Go
18 lines
406 B
Go
|
package system
|
||
|
|
||
|
import (
|
||
|
"github.com/gin-gonic/gin"
|
||
|
v1 "miniapp/api/v1"
|
||
|
)
|
||
|
|
||
|
type InitRouter struct{}
|
||
|
|
||
|
func (s *InitRouter) InitInitRouter(Router *gin.RouterGroup) {
|
||
|
initRouter := Router.Group("init")
|
||
|
dbApi := v1.ApiGroupApp.SystemApiGroup.DBApi
|
||
|
{
|
||
|
initRouter.POST("initdb", dbApi.InitDB) // 初始化数据库
|
||
|
initRouter.POST("checkdb", dbApi.CheckDB) // 检测是否需要初始化数据库
|
||
|
}
|
||
|
}
|