You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
666 B
Go
30 lines
666 B
Go
package base
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"git.noahlan.cn/noahlan/ntool-biz/zero/statusz"
|
|
|
|
"git.noahlan.cn/n-admin/n-admin-server/api/internal/logic/base"
|
|
"git.noahlan.cn/n-admin/n-admin-server/api/internal/svc"
|
|
)
|
|
|
|
// swagger:route get /api/base/initDatabase base InitDatabase
|
|
//
|
|
// Initialize database | 初始化数据库
|
|
//
|
|
// Initialize database | 初始化数据库
|
|
//
|
|
|
|
func InitDatabaseHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
const transErr = true
|
|
|
|
l := base.NewInitDatabaseLogic(r, r.Context(), svcCtx)
|
|
err := l.InitDatabase()
|
|
|
|
statusz.ResponseHandler(r, w, transErr, nil, err)
|
|
|
|
}
|
|
}
|