bugfix get roles

This commit is contained in:
2024-12-22 15:00:44 +09:00
parent 1420773548
commit a5f5b3fccf
8 changed files with 78 additions and 18 deletions

View File

@@ -2,6 +2,7 @@
from fastapi import Depends
from app.db.session import get_tenant_db,get_user_db
from app.core import tenantCacheService
from app.db.session import tenantdb
def get_db(tenant:str = "1",tenantdb = Depends(get_tenant_db)):
db_url = tenantCacheService.get_tenant_db(tenantdb,tenant)
@@ -10,3 +11,8 @@ def get_db(tenant:str = "1",tenantdb = Depends(get_tenant_db)):
yield db
finally:
db.close()
def get_log_db():
db = tenantdb.get_db()
return db