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
b5f6a78845
commit
275ff88615
5 changed files with 15 additions and 19 deletions
|
|
@ -1 +1,2 @@
|
|||
dart run build_runner build --delete-conflicting-outputs --verbose
|
||||
dart run build_runner build --delete-conflicting-outputs --verbose
|
||||
dart format .
|
||||
|
|
@ -197,7 +197,6 @@ extension GetItInjectableX on _i174.GetIt {
|
|||
() => _i797.ProductAvailabilityManager(
|
||||
gh<_i833.PackManager>(),
|
||||
gh<_i1072.AppDatabase>(),
|
||||
publicPackIds: gh<Set<String>>(),
|
||||
),
|
||||
);
|
||||
gh.lazySingleton<_i1062.FreePacksDistributor>(
|
||||
|
|
@ -236,6 +235,14 @@ extension GetItInjectableX on _i174.GetIt {
|
|||
gh.lazySingleton<_i561.MnemoShelf>(
|
||||
() => _i561.MnemoShelf(gh<_i280.UserManager>()),
|
||||
);
|
||||
gh.lazySingleton<_i52.AuthApiV2>(
|
||||
() => _i52.AuthApiV2(
|
||||
gh<_i280.UserManager>(),
|
||||
gh<_i972.GoogleApi>(),
|
||||
gh<_i108.JwtService>(),
|
||||
gh<_i240.TelegramAuthCodeService>(),
|
||||
),
|
||||
);
|
||||
gh.lazySingleton<_i1009.PaymentManager>(
|
||||
() => _i1009.PaymentManager(
|
||||
gh<_i1072.AppDatabase>(),
|
||||
|
|
@ -277,15 +284,6 @@ extension GetItInjectableX on _i174.GetIt {
|
|||
gh<_i1072.AppDatabase>(),
|
||||
),
|
||||
);
|
||||
gh.lazySingleton<_i52.AuthApiV2>(
|
||||
() => _i52.AuthApiV2(
|
||||
gh<_i1072.AppDatabase>(),
|
||||
gh<_i280.UserManager>(),
|
||||
gh<_i972.GoogleApi>(),
|
||||
gh<_i108.JwtService>(),
|
||||
gh<_i240.TelegramAuthCodeService>(),
|
||||
),
|
||||
);
|
||||
gh.lazySingleton<_i247.UsersApiV2>(
|
||||
() => _i247.UsersApiV2(
|
||||
gh<_i280.UserManager>(),
|
||||
|
|
|
|||
|
|
@ -21,14 +21,12 @@ part 'auth_api_v2.g.dart';
|
|||
/// Implements OAuth2/JWT Bearer token authentication
|
||||
@lazySingleton
|
||||
class AuthApiV2 {
|
||||
final AppDatabase _db;
|
||||
final UserManager _userManager;
|
||||
final GoogleApi _googleApi;
|
||||
final JwtService _jwtService;
|
||||
final TelegramAuthCodeService _telegramAuthCodeService;
|
||||
|
||||
AuthApiV2(
|
||||
this._db,
|
||||
this._userManager,
|
||||
this._googleApi,
|
||||
this._jwtService,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@ import 'product_availability_manager.dart';
|
|||
/// Extension для конвертации CardPack (Drift) в DTO
|
||||
extension CardPackToDto on CardPack {
|
||||
Future<CardPackPreviewDto> toPreviewDto(UserModel? user) async {
|
||||
final isAvailable = await getIt.get<ProductAvailabilityManager>().isPackAvailable(packId: id.toString(), user: user);
|
||||
final isAvailable = await getIt
|
||||
.get<ProductAvailabilityManager>()
|
||||
.isPackAvailable(packId: id.toString(), user: user);
|
||||
|
||||
// Generate cover image URL
|
||||
String? coverUrl;
|
||||
|
|
|
|||
|
|
@ -12,11 +12,8 @@ class ProductAvailabilityManager {
|
|||
final AppDatabase _db;
|
||||
final Set<String> _publicPackIds;
|
||||
|
||||
ProductAvailabilityManager(
|
||||
this._packManager,
|
||||
this._db, {
|
||||
Set<String>? publicPackIds,
|
||||
}) : _publicPackIds = publicPackIds ?? const {'10'};
|
||||
ProductAvailabilityManager(this._packManager, this._db)
|
||||
: _publicPackIds = const {'10'};
|
||||
|
||||
/// Проверить доступность пакета для пользователя
|
||||
///
|
||||
|
|
|
|||
Loading…
Reference in a new issue