backend fix
Some checks are pending
Backend CI / test (push) Waiting to run
Backend CI / build (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions
Some checks are pending
Backend CI / test (push) Waiting to run
Backend CI / build (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions
This commit is contained in:
parent
a6fd99559a
commit
17f74cc613
3 changed files with 37 additions and 37 deletions
|
|
@ -67,6 +67,7 @@ extension GetItInjectableX on _i174.GetIt {
|
||||||
final gh = _i526.GetItHelper(this, environment, environmentFilter);
|
final gh = _i526.GetItHelper(this, environment, environmentFilter);
|
||||||
final appModule = _$AppModule();
|
final appModule = _$AppModule();
|
||||||
gh.singleton<_i1072.AppDatabase>(() => appModule.database);
|
gh.singleton<_i1072.AppDatabase>(() => appModule.database);
|
||||||
|
gh.singleton<_i988.YooMoneyHandler>(() => appModule.yooMoneyHandler);
|
||||||
gh.singleton<_i533.MinioConfig>(() => appModule.minioConfig);
|
gh.singleton<_i533.MinioConfig>(() => appModule.minioConfig);
|
||||||
gh.lazySingleton<_i846.AdsManager>(() => _i846.AdsManager());
|
gh.lazySingleton<_i846.AdsManager>(() => _i846.AdsManager());
|
||||||
gh.lazySingleton<_i222.RustorePurchaseHandler>(
|
gh.lazySingleton<_i222.RustorePurchaseHandler>(
|
||||||
|
|
@ -140,6 +141,13 @@ extension GetItInjectableX on _i174.GetIt {
|
||||||
gh.lazySingleton<_i858.DiscountsApiV2>(
|
gh.lazySingleton<_i858.DiscountsApiV2>(
|
||||||
() => _i858.DiscountsApiV2(gh<_i891.DiscountsManager>()),
|
() => _i858.DiscountsApiV2(gh<_i891.DiscountsManager>()),
|
||||||
);
|
);
|
||||||
|
gh.lazySingleton<_i1009.PaymentManager>(
|
||||||
|
() => _i1009.PaymentManager(
|
||||||
|
gh<_i1072.AppDatabase>(),
|
||||||
|
gh<_i988.YooMoneyHandler>(),
|
||||||
|
gh<_i222.RustorePurchaseHandler>(),
|
||||||
|
),
|
||||||
|
);
|
||||||
gh.lazySingleton<_i365.MediaApiV2>(
|
gh.lazySingleton<_i365.MediaApiV2>(
|
||||||
() => _i365.MediaApiV2(gh<_i747.MinioService>()),
|
() => _i365.MediaApiV2(gh<_i747.MinioService>()),
|
||||||
);
|
);
|
||||||
|
|
@ -163,9 +171,11 @@ extension GetItInjectableX on _i174.GetIt {
|
||||||
gh<_i108.JwtService>(),
|
gh<_i108.JwtService>(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
gh.lazySingleton<_i988.YooMoneyHandler>(
|
gh.lazySingleton<_i151.PromoCodesManager>(
|
||||||
() =>
|
() => _i151.PromoCodesManager(
|
||||||
_i988.YooMoneyHandler(shopId: gh<String>(), secretKey: gh<String>()),
|
gh<_i1072.AppDatabase>(),
|
||||||
|
gh<_i1009.PaymentManager>(),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
gh.lazySingleton<_i560.UserManager>(
|
gh.lazySingleton<_i560.UserManager>(
|
||||||
() => _i560.UserManager(
|
() => _i560.UserManager(
|
||||||
|
|
@ -179,12 +189,29 @@ extension GetItInjectableX on _i174.GetIt {
|
||||||
gh.lazySingleton<_i561.MnemoShelf>(
|
gh.lazySingleton<_i561.MnemoShelf>(
|
||||||
() => _i561.MnemoShelf(gh<_i280.UserManager>()),
|
() => _i561.MnemoShelf(gh<_i280.UserManager>()),
|
||||||
);
|
);
|
||||||
|
gh.lazySingleton<_i247.UsersApiV2>(
|
||||||
|
() => _i247.UsersApiV2(
|
||||||
|
gh<_i280.UserManager>(),
|
||||||
|
gh<_i1009.PaymentManager>(),
|
||||||
|
gh<_i1029.StatisticsCalculator>(),
|
||||||
|
gh<_i1072.AppDatabase>(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
gh.lazySingleton<_i273.PromocodesApiV2>(
|
||||||
|
() => _i273.PromocodesApiV2(gh<_i151.PromoCodesManager>()),
|
||||||
|
);
|
||||||
gh.lazySingleton<_i908.ProductsPriceResolver>(
|
gh.lazySingleton<_i908.ProductsPriceResolver>(
|
||||||
() => _i908.ProductsPriceResolver(
|
() => _i908.ProductsPriceResolver(
|
||||||
gh<_i891.DiscountsManager>(),
|
gh<_i891.DiscountsManager>(),
|
||||||
gh<_i1072.AppDatabase>(),
|
gh<_i1072.AppDatabase>(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
gh.lazySingleton<_i735.CheckPaymentTask>(
|
||||||
|
() => _i735.CheckPaymentTask(
|
||||||
|
gh<_i1009.PaymentManager>(),
|
||||||
|
gh<_i1072.AppDatabase>(),
|
||||||
|
),
|
||||||
|
);
|
||||||
gh.lazySingleton<_i170.TestsApiV2>(
|
gh.lazySingleton<_i170.TestsApiV2>(
|
||||||
() => _i170.TestsApiV2(
|
() => _i170.TestsApiV2(
|
||||||
gh<_i259.TestManager>(),
|
gh<_i259.TestManager>(),
|
||||||
|
|
@ -201,42 +228,12 @@ extension GetItInjectableX on _i174.GetIt {
|
||||||
gh<_i240.TelegramAuthCodeService>(),
|
gh<_i240.TelegramAuthCodeService>(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
gh.lazySingleton<_i1009.PaymentManager>(
|
|
||||||
() => _i1009.PaymentManager(
|
|
||||||
gh<_i1072.AppDatabase>(),
|
|
||||||
gh<_i988.YooMoneyHandler>(),
|
|
||||||
gh<_i222.RustorePurchaseHandler>(),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
gh.lazySingleton<_i151.PromoCodesManager>(
|
|
||||||
() => _i151.PromoCodesManager(
|
|
||||||
gh<_i1072.AppDatabase>(),
|
|
||||||
gh<_i1009.PaymentManager>(),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
gh.lazySingleton<_i433.PackDtoConverter>(
|
gh.lazySingleton<_i433.PackDtoConverter>(
|
||||||
() => _i433.PackDtoConverter(
|
() => _i433.PackDtoConverter(
|
||||||
gh<_i908.ProductsPriceResolver>(),
|
gh<_i908.ProductsPriceResolver>(),
|
||||||
gh<_i846.AdsManager>(),
|
gh<_i846.AdsManager>(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
gh.lazySingleton<_i247.UsersApiV2>(
|
|
||||||
() => _i247.UsersApiV2(
|
|
||||||
gh<_i280.UserManager>(),
|
|
||||||
gh<_i1009.PaymentManager>(),
|
|
||||||
gh<_i1029.StatisticsCalculator>(),
|
|
||||||
gh<_i1072.AppDatabase>(),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
gh.lazySingleton<_i273.PromocodesApiV2>(
|
|
||||||
() => _i273.PromocodesApiV2(gh<_i151.PromoCodesManager>()),
|
|
||||||
);
|
|
||||||
gh.lazySingleton<_i735.CheckPaymentTask>(
|
|
||||||
() => _i735.CheckPaymentTask(
|
|
||||||
gh<_i1009.PaymentManager>(),
|
|
||||||
gh<_i1072.AppDatabase>(),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
gh.lazySingleton<_i833.PackManager>(
|
gh.lazySingleton<_i833.PackManager>(
|
||||||
() => _i833.PackManager(
|
() => _i833.PackManager(
|
||||||
gh<_i1072.AppDatabase>(),
|
gh<_i1072.AppDatabase>(),
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,18 @@ import 'package:injectable/injectable.dart';
|
||||||
import '../../database/database.dart';
|
import '../../database/database.dart';
|
||||||
import '../../main.dart' as backend_main;
|
import '../../main.dart' as backend_main;
|
||||||
import '../../storage/minio_config.dart';
|
import '../../storage/minio_config.dart';
|
||||||
|
import '../purchase/yoo_money.dart';
|
||||||
|
|
||||||
@module
|
@module
|
||||||
abstract class AppModule {
|
abstract class AppModule {
|
||||||
@singleton
|
@singleton
|
||||||
AppDatabase get database => backend_main.database;
|
AppDatabase get database => backend_main.database;
|
||||||
|
|
||||||
// YooMoneyHandler is registered via @LazySingleton() annotation
|
@singleton
|
||||||
// in yoo_money.dart, so we don't need to register it here
|
YooMoneyHandler get yooMoneyHandler => YooMoneyHandler(
|
||||||
|
shopId: Platform.environment['YOOKASSA_SHOP_ID'] ?? '',
|
||||||
|
secretKey: Platform.environment['YOOKASSA_SECRET_KEY'] ?? '',
|
||||||
|
);
|
||||||
|
|
||||||
@singleton
|
@singleton
|
||||||
MinioConfig get minioConfig => MinioConfig.fromEnvironment();
|
MinioConfig get minioConfig => MinioConfig.fromEnvironment();
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ import 'dart:developer';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
import 'package:injectable/injectable.dart';
|
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
/// Wrapper for YooKassa payment response
|
/// Wrapper for YooKassa payment response
|
||||||
|
|
@ -22,7 +21,7 @@ class YookassaPayment {
|
||||||
/// Handler for YooKassa payment integration
|
/// Handler for YooKassa payment integration
|
||||||
/// Implements YooKassa API v3 according to OpenAPI specification
|
/// Implements YooKassa API v3 according to OpenAPI specification
|
||||||
/// https://yookassa.ru/developers/using-api/openapi-specification
|
/// https://yookassa.ru/developers/using-api/openapi-specification
|
||||||
@LazySingleton()
|
/// Note: Registered via @module in modules.dart to provide environment variables
|
||||||
class YooMoneyHandler {
|
class YooMoneyHandler {
|
||||||
final String _shopId;
|
final String _shopId;
|
||||||
final String _secretKey;
|
final String _secretKey;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue