@@ -66,14 +66,12 @@ Future<HttpServer> run(Handler handler, InternetAddress ip, int port) async {
66
66
67
67
// This middleware wraps the main handler. It awaits the completer's future,
68
68
// effectively pausing the request until `initCompleter.complete()` is called.
69
- final gatedHandler = handler.use (
70
- (innerHandler) {
71
- return (context) async {
72
- await initCompleter.future;
73
- return innerHandler (context);
74
- };
75
- },
76
- );
69
+ final gatedHandler = handler.use ((innerHandler) {
70
+ return (context) async {
71
+ await initCompleter.future;
72
+ return innerHandler (context);
73
+ };
74
+ });
77
75
78
76
// 1. Setup Logger
79
77
Logger .root.level = Level .ALL ;
@@ -152,10 +150,10 @@ Future<HttpServer> run(Handler handler, InternetAddress ip, int port) async {
152
150
);
153
151
final userContentPreferencesRepository =
154
152
_createRepository <UserContentPreferences >(
155
- tableName: 'user_content_preferences' ,
156
- fromJson: UserContentPreferences .fromJson,
157
- toJson: (p) => p.toJson (),
158
- );
153
+ tableName: 'user_content_preferences' ,
154
+ fromJson: UserContentPreferences .fromJson,
155
+ toJson: (p) => p.toJson (),
156
+ );
159
157
final appConfigRepository = _createRepository <AppConfig >(
160
158
tableName: 'app_config' ,
161
159
fromJson: AppConfig .fromJson,
@@ -167,7 +165,7 @@ Future<HttpServer> run(Handler handler, InternetAddress ip, int port) async {
167
165
emailClient: HtEmailInMemoryClient (),
168
166
);
169
167
final tokenBlacklistService = InMemoryTokenBlacklistService ();
170
- final authTokenService = JwtAuthTokenService (
168
+ final AuthTokenService authTokenService = JwtAuthTokenService (
171
169
userRepository: userRepository,
172
170
blacklistService: tokenBlacklistService,
173
171
uuidGenerator: const Uuid (),
@@ -183,15 +181,17 @@ Future<HttpServer> run(Handler handler, InternetAddress ip, int port) async {
183
181
userContentPreferencesRepository: userContentPreferencesRepository,
184
182
uuidGenerator: const Uuid (),
185
183
);
186
- final dashboardSummaryService = DashboardSummaryService (
187
- headlineRepository: headlineRepository,
188
- categoryRepository: categoryRepository,
189
- sourceRepository: sourceRepository,
190
- );
184
+ final dashboardSummaryService =
185
+ DashboardSummaryService (
186
+ headlineRepository: headlineRepository,
187
+ categoryRepository: categoryRepository,
188
+ sourceRepository: sourceRepository,
189
+ );
191
190
const permissionService = PermissionService ();
192
- final userPreferenceLimitService = DefaultUserPreferenceLimitService (
193
- appConfigRepository: appConfigRepository,
194
- );
191
+ final UserPreferenceLimitService userPreferenceLimitService =
192
+ DefaultUserPreferenceLimitService (
193
+ appConfigRepository: appConfigRepository,
194
+ );
195
195
196
196
// 6. Populate the DependencyContainer
197
197
DependencyContainer .instance.init (
@@ -231,4 +231,4 @@ Future<HttpServer> run(Handler handler, InternetAddress ip, int port) async {
231
231
});
232
232
233
233
return server;
234
- }
234
+ }
0 commit comments