mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 13:20:19 +08:00
Run sync user job if configured.
This commit is contained in:
@ -28,18 +28,17 @@ func initConfig() {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
initAdapter()
|
||||
}
|
||||
|
||||
func initAdapter() {
|
||||
func InitAdapter() bool {
|
||||
if dbName == "dbName" {
|
||||
adapter = nil
|
||||
return
|
||||
return false
|
||||
}
|
||||
|
||||
adapter = object.NewAdapter(beego.AppConfig.String("driverName"), beego.AppConfig.String("dataSourceName"), dbName)
|
||||
createTable(adapter)
|
||||
return true
|
||||
}
|
||||
|
||||
func createTable(a *object.Adapter) {
|
||||
|
Reference in New Issue
Block a user