You've already forked RekomenciBackend
add StorageProvider
This commit is contained in:
@@ -18,6 +18,7 @@ from template_project.web_api.ioc.idp import IdPProvider
|
||||
from template_project.web_api.ioc.interactor import InteractorProvider
|
||||
from template_project.web_api.ioc.notifications import NotificationServiceProvider
|
||||
from template_project.web_api.ioc.oauth import OAuthClientProvider
|
||||
from template_project.web_api.ioc.storage import StorageProvider
|
||||
|
||||
|
||||
def make_ioc(configuration: Configuration) -> AsyncContainer:
|
||||
@@ -31,6 +32,7 @@ def make_ioc(configuration: Configuration) -> AsyncContainer:
|
||||
CryptographerProvider(),
|
||||
OAuthClientProvider(),
|
||||
NotificationServiceProvider(),
|
||||
StorageProvider(),
|
||||
validation_settings=STRICT_VALIDATION,
|
||||
context={
|
||||
ServerConfiguration: configuration.server,
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
from dishka import Provider, Scope, WithParents, provide
|
||||
|
||||
from template_project.adapters.s3_storage import S3FileStorage
|
||||
|
||||
|
||||
class StorageProvider(Provider):
|
||||
scope = Scope.APP
|
||||
|
||||
s3_file_storage = provide(WithParents[S3FileStorage])
|
||||
Reference in New Issue
Block a user