mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-09-20 19:07:56 +08:00
fix(config): use web.AppConfig instead of adapter
- use web.AppConfig, and change related codes TODO: handles errors
This commit is contained in:
@@ -21,8 +21,8 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"github.com/beego/beego/v2/adapter"
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/server/web"
|
||||
"github.com/mindoc-org/mindoc/models"
|
||||
)
|
||||
|
||||
@@ -114,8 +114,8 @@ func RunMigration() {
|
||||
|
||||
//导出数据库的表结构
|
||||
func ExportDatabaseTable() ([]string, error) {
|
||||
dbadapter := adapter.AppConfig.String("db_adapter")
|
||||
dbdatabase := adapter.AppConfig.String("db_database")
|
||||
dbadapter,_ := web.AppConfig.String("db_adapter")
|
||||
dbdatabase,_ := web.AppConfig.String("db_database")
|
||||
tables := make([]string, 0)
|
||||
|
||||
o := orm.NewOrm()
|
||||
|
Reference in New Issue
Block a user