Refactor the original db code.

This commit is contained in:
Gucheng Wang
2021-12-18 01:08:03 +08:00
parent 07f9a9ee96
commit 318cf52b33
16 changed files with 342 additions and 382 deletions

View File

@ -21,7 +21,6 @@ import (
_ "github.com/astaxie/beego/session/redis"
"github.com/casbin/casdoor/authz"
"github.com/casbin/casdoor/object"
"github.com/casbin/casdoor/original"
"github.com/casbin/casdoor/proxy"
"github.com/casbin/casdoor/routers"
@ -36,9 +35,7 @@ func main() {
proxy.InitHttpClient()
authz.InitAuthz()
if original.InitAdapter() {
go original.RunSyncUsersJob()
}
go object.RunSyncUsersJob()
beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{
AllowOrigins: []string{"*"},