feat(solaris): add proper client initialization

This commit is contained in:
h
2025-07-01 18:46:16 +03:00
parent 61b9f2265f
commit 6d34e41c73
8 changed files with 32 additions and 15 deletions

View File

@@ -0,0 +1,13 @@
from typing import AsyncIterable
from dishka import Provider, Scope, provide
from bot.modules.solaris.client import SolarisClient
from utils.env import env
class SolarisClientProvider(Provider):
@provide(scope=Scope.APP)
async def get_client(self) -> AsyncIterable[SolarisClient]:
client = SolarisClient(env.google.api_key.get_secret_value())
yield client