@@ -9,6 +9,7 @@ import 'package:flutter_news_app_api_server_full_source_code/src/config/environm
9
9
import 'package:flutter_news_app_api_server_full_source_code/src/rbac/permission_service.dart' ;
10
10
import 'package:flutter_news_app_api_server_full_source_code/src/services/auth_service.dart' ;
11
11
import 'package:flutter_news_app_api_server_full_source_code/src/services/auth_token_service.dart' ;
12
+ import 'package:flutter_news_app_api_server_full_source_code/src/services/country_query_service.dart' ;
12
13
import 'package:flutter_news_app_api_server_full_source_code/src/services/dashboard_summary_service.dart' ;
13
14
import 'package:flutter_news_app_api_server_full_source_code/src/services/database_seeding_service.dart' ;
14
15
import 'package:flutter_news_app_api_server_full_source_code/src/services/default_user_preference_limit_service.dart' ;
@@ -69,6 +70,7 @@ class AppDependencies {
69
70
late final PermissionService permissionService;
70
71
late final UserPreferenceLimitService userPreferenceLimitService;
71
72
late final RateLimitService rateLimitService;
73
+ late final CountryQueryService countryQueryService;
72
74
73
75
/// Initializes all application dependencies.
74
76
///
@@ -238,6 +240,11 @@ class AppDependencies {
238
240
connectionManager: _mongoDbConnectionManager,
239
241
log: Logger ('MongoDbRateLimitService' ),
240
242
);
243
+ countryQueryService = CountryQueryService (
244
+ countryRepository: countryRepository,
245
+ log: Logger ('CountryQueryService' ),
246
+ cacheDuration: EnvironmentConfig .countryServiceCacheDuration,
247
+ );
241
248
242
249
_isInitialized = true ;
243
250
_log.info ('Application dependencies initialized successfully.' );
@@ -255,6 +262,7 @@ class AppDependencies {
255
262
await _mongoDbConnectionManager.close ();
256
263
tokenBlacklistService.dispose ();
257
264
rateLimitService.dispose ();
265
+ countryQueryService.dispose (); // Dispose the new service
258
266
_isInitialized = false ;
259
267
_log.info ('Application dependencies disposed.' );
260
268
}
0 commit comments