jwt validation, getting the correct database
This commit is contained in:
@ -2,6 +2,7 @@ package test
|
||||
|
||||
import (
|
||||
_ "multitenantStack/routers"
|
||||
auth "multitenantStack/services/authentication"
|
||||
|
||||
"github.com/astaxie/beego"
|
||||
"github.com/astaxie/beego/orm"
|
||||
@ -10,8 +11,7 @@ import (
|
||||
|
||||
func init() {
|
||||
orm.RegisterDataBase("default", "postgres", "host=127.0.0.1 port=5435 user=postgres password=postgre sslmode=disable")
|
||||
orm.RegisterDataBase("company1", "postgres", "host=127.0.0.1 port=5435 user=postgres password=postgre dbname=company1 sslmode=disable")
|
||||
orm.RegisterDataBase("company2", "postgres", "host=127.0.0.1 port=5435 user=postgres password=postgre dbname=company2 sslmode=disable")
|
||||
auth.InitAuthService()
|
||||
|
||||
orm.Debug = true
|
||||
beego.BConfig.WebConfig.DirectoryIndex = true
|
||||
|
Reference in New Issue
Block a user