mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-01-25 02:02:56 -05:00
refactor(backend): ♻️ add initial support for global dependency injection
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
from functools import lru_cache
|
||||
|
||||
from .data_access_layer import DatabaseAccessLayer
|
||||
|
||||
db = DatabaseAccessLayer()
|
||||
|
||||
|
||||
@lru_cache
|
||||
def get_database():
|
||||
return db
|
||||
|
||||
Reference in New Issue
Block a user