@@ -128,22 +128,19 @@ class DatabaseSeedingService {
128128 _log.info ('Ensuring database indexes exist...' );
129129 try {
130130 // Text index for searching headlines by title
131- await _db.collection ('headlines' ).createIndex (
132- keys: {'title' : 'text' },
133- name: 'headlines_text_index' ,
134- );
131+ await _db
132+ .collection ('headlines' )
133+ .createIndex (keys: {'title' : 'text' }, name: 'headlines_text_index' );
135134
136135 // Text index for searching topics by name
137- await _db.collection ('topics' ).createIndex (
138- keys: {'name' : 'text' },
139- name: 'topics_text_index' ,
140- );
136+ await _db
137+ .collection ('topics' )
138+ .createIndex (keys: {'name' : 'text' }, name: 'topics_text_index' );
141139
142140 // Text index for searching sources by name
143- await _db.collection ('sources' ).createIndex (
144- keys: {'name' : 'text' },
145- name: 'sources_text_index' ,
146- );
141+ await _db
142+ .collection ('sources' )
143+ .createIndex (keys: {'name' : 'text' }, name: 'sources_text_index' );
147144
148145 // --- TTL and Unique Indexes via runCommand ---
149146 // The following indexes are created using the generic `runCommand` because
@@ -169,8 +166,8 @@ class DatabaseSeedingService {
169166 'key' : {'email' : 1 },
170167 'name' : 'email_unique_index' ,
171168 'unique' : true ,
172- }
173- ]
169+ },
170+ ],
174171 });
175172
176173 // Index for the token blacklist collection
@@ -183,8 +180,8 @@ class DatabaseSeedingService {
183180 'key' : {'expiry' : 1 },
184181 'name' : 'expiry_ttl_index' ,
185182 'expireAfterSeconds' : 0 ,
186- }
187- ]
183+ },
184+ ],
188185 });
189186
190187 _log.info ('Database indexes are set up correctly.' );
0 commit comments