feat: функционал первой лабы перенос
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
from starlette.requests import HTTPConnection
|
||||
|
||||
from infrastructure.storage import InMemoryStorage
|
||||
|
||||
|
||||
def get_storage(connection: HTTPConnection) -> InMemoryStorage:
|
||||
"""Получение in-memory хранилища, созданного в lifespan."""
|
||||
storage: InMemoryStorage = connection.app.state.storage
|
||||
return storage
|
||||
Reference in New Issue
Block a user