11 lines
146 B
Python
11 lines
146 B
Python
|
from .database import SessionLocal
|
||
|
|
||
|
|
||
|
# Dependency
|
||
|
def get_db():
|
||
|
db = SessionLocal()
|
||
|
try:
|
||
|
yield db
|
||
|
finally:
|
||
|
db.close()
|